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

相关推荐
A阳俊yi33 分钟前
Spring——编程式事务
数据库·sql·spring
编程充电站pro37 分钟前
SQL 多表查询常用语法速查:INNER JOIN / LEFT JOIN / RIGHT JOIN
数据库·sql
杨云龙UP1 小时前
SQL Server数据库事务日志问题的诊断与解法(从膨胀到瘦身)
运维·数据库·sql·sqlserver·serverless
周杰伦的稻香2 小时前
MySQL5.7.44编译安装
数据库·mysql
reasonsummer2 小时前
【办公类-116-01】20250929家长会PPT(Python快速批量制作16:9PPT相册,带文件名,照片横版和竖版)
java·数据库·python·powerpoint
我是唐青枫2 小时前
深入掌握 FluentMigrator:C#.NET 数据库迁移框架详解
数据库·c#·.net
hqwest3 小时前
QT肝8天15--左侧静态菜单
开发语言·数据库·qt·qt开发·ui控件
青衿先生6 小时前
返璞归真-SQL基本语法
数据库·sql
weixin_456904277 小时前
数据库设计与UML图
数据库·uml
codecrafter1237 小时前
MATLAB中的while循环:从入门到精通的完整指南
java·数据库·其他·matlab