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

相关推荐
越来越无动于衷4 小时前
SQL 拼接完全指南
数据库·sql
weixin_46685 小时前
Redis数据库基础
数据库·redis·缓存
清风6666666 小时前
基于单片机的档案库房漏水检测报警labview上位机系统设计
数据库·单片机·毕业设计·课程设计·labview·期末大作业
DarkAthena6 小时前
【GaussDB】在duckdb中查询GaussDB的数据
数据库·gaussdb·duckdb
苏琢玉6 小时前
收藏版:Phinx 数据库迁移完全指南
数据库·mysql·php
七分小魔女6 小时前
MySQL查看服务器/客户端版本
服务器·数据库·mysql
亿坊电商7 小时前
如何检查开源CMS的数据库连接问题?
数据库·开源
指针不指南吗7 小时前
【论文阅读】图数据库 Survey: Graph Databases
数据库·论文阅读
fusugongzi7 小时前
mysql管理语句
数据库·mysql
寒山李白7 小时前
MySQL 下载、安装及配置教程(Msi安装)
数据库·mysql·msi