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';

相关推荐
xiao-xiang6 小时前
redis-保姆级配置详解
数据库·redis
白鹭7 小时前
MySQL(多表查询练习)
数据库·mysql
xiao-xiang11 小时前
redis-sentinel基础概念及部署
数据库·redis·sentinel
AI 嗯啦12 小时前
SQL详细语法教程(三)mysql的函数知识
android·开发语言·数据库·python·sql·mysql
好记忆不如烂笔头abc12 小时前
另类pdb恢复方式-2
oracle
时序数据说12 小时前
国内时序数据库概览
大数据·数据库·物联网·时序数据库·iotdb
杰克尼13 小时前
mysql-条件查询案例
数据库·mysql
运维行者_15 小时前
使用Applications Manager进行 Apache Solr 监控
运维·网络·数据库·网络安全·云计算·apache·solr
千层冷面18 小时前
Flask ORM 查询详解:Model.query vs db.session.query vs db.session.execute
数据库·python·django·flask