dataguard dg broker

Applies to:

Oracle Database - Enterprise Edition - Version 11.2.0.1 and later

Gen 1 Exadata Cloud at Customer (Oracle Exadata Database Cloud Machine) - Version N/A and later

Oracle Cloud Infrastructure - Database Service - Version N/A and later

Oracle Database Exadata Express Cloud Service - Version N/A and later

Oracle Database Cloud Exadata Service - Version N/A and later

Information in this document applies to any platform.

Goal

NOTE: In the images and/or the document content below, the user information and environment data used represents fictitious data from the Oracle sample schema(s), Public Documentation delivered with an Oracle database product or other training material. Any similarity to actual environments, actual persons, living or dead, is purely coincidental and not intended in any manner.

This documents describes the steps necessary to create, use and drop a Guaranteed restore point in a Data Guard configuration:

For the purposes of this document, the following fictitious environment is used as an example to describe the procedure:

Primary database: chicago

Standby database: boston

NOTE: Starting from 19c, be aware that standby can automatically perform flashback in response to similar operation on primary. Refer:

Automatic Flashback of a Mounted Standby After a Primary RESETLOGS Operation

https://docs.oracle.com/en/database/oracle/oracle-database/19/sbydb/managing-oracle-data-guard-physical-standby-databases.html#GUID-252097AC-3070-43B6-88D8-919AE27F97AD

Solution

CREATE GUARANTEED RESTORE POINT

  1. Stop redo transport and redo apply

a)If broker is not configured:

On primary database:

SQL> alter system set log_archive_dest_state_n='defer'; =====>>>>>replace n with the corresponding number for remote destinations

On standby database:

SQL> alter database recover managed standby database cancel;

b)If broker is in place:

DGMGRL> edit database chicago set state = 'TRANSPORT-OFF';

DGMGRL> edit database boston set state = 'APPLY-OFF';

  1. Set GRP in standby database

On standby database:

SQL> CREATE RESTORE POINT grp_dg GUARANTEE FLASHBACK DATABASE;

  1. Set GRP in primary database

On primary database:

SQL> CREATE RESTORE POINT grp_dg GUARANTEE FLASHBACK DATABASE;

  1. Enable redo transport and redo apply

a)If broker is not configured:

On primary database:

SQL> alter system set log_archive_dest_state_n='enable'; =====>>>>>replace n with the corresponding number for remote destinations

On standby database:

SQL> alter database recover managed standby database using current logfile disconnect;

b)If broker is in place:

DGMGRL> edit database chicago set state = 'TRANSPORT-ON';

DGMGRL> edit database boston set state = 'APPLY-ON';

FLASHBACK DATABASE TO GUARANTEED RESTORE POINT

  1. Stop redo transport and redo apply

a)If broker is not configured:

On primary database:

SQL> alter system set log_archive_dest_state_n='defer'; =====>>>>>replace n with the corresponding number for remote destinations

On standby database:

SQL> alter database recover managed standby database cancel;

b)If broker is in place:

DGMGRL> edit database chicago set state = 'TRANSPORT-OFF';

DGMGRL> edit database boston set state = 'APPLY-OFF';

  1. Shutdown Primary Database and start one instance in mount stage

  2. Flashback primary database to restore point

On primary database:

SQL> flashback database to RESTORE POINT grp_dg;

SQL> alter database open resetlogs;

  1. Shutdown Standby database and start one instance in mount stage

  2. Flashback standby database

On standby database:

SQL> flashback database to RESTORE POINT grp_dg;

  1. Enable redo transport and redo apply

a)If broker is not configured:

On primary database:

SQL> alter system set log_archive_dest_state_n='enable'; =====>>>>>replace n with the corresponding number for remote destinations

On standby database:

SQL> alter database recover managed standby database using current logfile disconnect;

b)If broker is in place:

DGMGRL> edit database chicago set state = 'TRANSPORT-ON';

DGMGRL> edit database boston set state = 'APPLY-ON';

  1. If Active Data Guard licence is used, open read only the standby database

DROP GUARANTEED RESTORE POINT

  1. Stop redo transport and redo apply

a)If broker is not configured:

On primary database:

SQL> alter system set log_archive_dest_state_n='defer'; =====>>>>>replace n with the corresponding number for remote destinations

On standby database:

SQL> alter database recover managed standby database cancel;

b)If broker is in place:

DGMGRL> edit database chicago set state = 'TRANSPORT-OFF';

DGMGRL> edit database boston set state = 'APPLY-OFF';

  1. Drop GRP in primary database

On primary database:

SQL> drop RESTORE POINT grp_dg;

  1. Drop GRP in standby database

Ensure the standby database is in mount stage and drop GRP:

SQL> drop restore point grp_dg;

If Active Data Guard licence is used, open read only the standby database after dropping the GRP

  1. Enable redo transport and redo apply

a)If broker is not configured:

On primary database:

SQL> alter system set log_archive_dest_state_n='enable'; =====>>>>>replace n with the corresponding number for remote destinations

On standby database:

SQL> alter database recover managed standby database using current logfile disconnect;

b)If broker is in place:

DGMGRL> edit database chicago set state = 'TRANSPORT-ON';

DGMGRL> edit database boston set state = 'APPLY-ON';

相关推荐
爬山算法40 分钟前
Redis(50) Redis哨兵如何与客户端进行交互?
数据库·redis·交互
007php00744 分钟前
某大厂MySQL面试之SQL注入触点发现与SQLMap测试
数据库·python·sql·mysql·面试·职场和发展·golang
YS_Geo1 小时前
Redis 深度解析:数据结构、持久化与集群
数据结构·数据库·redis
IvanCodes1 小时前
六、Docker 核心技术:Dockerfile 指令详解
java·数据库·docker
寻星探路1 小时前
数据结构造神计划第三天---数据类型
数据库
l5657582 小时前
第五十五天(SQL注入&增删改查&HTTP头&UA&XFF&Referer&Cookie&无回显报错&复盘)
数据库
上海达策TECHSONIC2 小时前
经验分享:如何让SAP B1数据库性能提升50%
运维·数据库·运维开发
言之。2 小时前
深入解析Django重定向机制
数据库·django·sqlite
时序数据说3 小时前
国内开源时序数据库IoTDB介绍
大数据·数据库·物联网·开源·时序数据库·iotdb