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

相关推荐
程序人生5182 小时前
MongoDB 查询时区问题
数据库·mongodb
cookqq2 小时前
mongodb源代码分析createCollection命令由create.idl变成create_gen.cpp过程
数据库·算法·mongodb·nosql
Navicat中国3 小时前
Navicat 17.3 正式发布 | 现已支持达梦、金仓和 IvorySQL 数据库
数据库·数据库开发·达梦·数据可视化·navicat
Dajiaonew4 小时前
从零搭建Cloud Alibaba
java·数据库·分布式·微服务
李宥小哥4 小时前
SQL通用增删改查
数据库·sql
张晓~183399481215 小时前
如果通过源码技术实现矩阵系统分部门管理?
jvm·数据库·线性代数·算法·microsoft·矩阵·html5
黑客飓风5 小时前
MySQL配置性能优化赛
数据库·mysql·性能优化
JeffreyGu.5 小时前
【Oracle】Oracle 11g 中扩展表空间
数据库·oracle
盟接之桥6 小时前
盟接之桥说制造:差异化定位与效率竞争的双轮驱动
大数据·服务器·数据库·人工智能·制造
徐子童7 小时前
初识Redis---Redis的特性介绍
java·数据库·redis