重庆思庄Oracle、Redhat认证学习论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 1992|回复: 0
打印 上一主题 下一主题

[参考文档] 如何完整的去除ORACLE DG环境

[复制链接]
跳转到指定楼层
楼主
发表于 2020-4-17 10:15:06 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
本帖最后由 郑全 于 2020-4-17 10:22 编辑

How to remove a Data Guard Configuration from Primary Database (Doc ID 733794.1)
In this Document
Goal
Solution

Applies to:
Oracle Database - Enterprise Edition - Version 10.1.0.2 to 11.2.0.3 [Release 10.1 to 11.2]
Oracle Database - Enterprise Edition - Version 11.2.0.4 to 11.2.0.4 [Release 11.2]
Oracle Database Cloud Schema Service - Version N/A and later
Oracle Database Exadata Express Cloud Service - Version N/A and later
Oracle Database Exadata Cloud Machine - Version N/A and later
Information in this document applies to any platform.



Goal
How to remove a Data Guard Configuration from the Primary Database after Standby Database is no longer present or activated to work as new/separate Primary (including the Steps for the Data Guard Broker).

Solution
1. Put Primary Database in Maximum Performance Mode

On the Primary database, put the Database in Maximum Performance Mode (if not already):

SQL> ALTER DATABASE SET STANDBY DATABASE TO MAXIMIZE PERFORMANCE;

or if using the Data Guard Broker:

DGMGRL> EDIT CONFIGURATION SET PROTECTION MODE AS MAXPERFORMANCE;

2. Remove Data Guard Broker Configuration
If you are using the Data Guard Broker, remove the Data Guard Broker Configuration:
DGMGRL> REMOVE CONFIGURATION;

3. Unset Data Guard-specific Initialization Parameters

Unset/Remove following Initialization Parameters from the (S)PFILE of the Primary Database:


LOG_ARCHIVE_CONFIG

DB_FILE_NAME_CONVERT
LOG_FILE_NAME_CONVERT
LOG_ARCHIVE_DEST_n pointing to the Standby Database and valid for STANDBY_LOGFILES
LOG_ARCHIVE_DEST_STATE_n
DG_BROKER_START
DG_BROKER_CONFIG_FILE1
DG_BROKER_CONFIG_FILE2
STANDBY_ARCHIVE_DEST
STANDBY_FILE_MANAGEMENT
FAL_SERVER
FAL_CLIENT

4. Drop Standby Redologs from the Primary Database

Use following Query to check for Standby Redolog Groups:

SQL> SELECT GROUP# FROM V$STANDBY_LOG;

Use following Command to Drop the Standby Redo logs:

SQL> ALTER DATABASE DROP STANDBY LOGFILE GROUP <GROUP_NUMBER>;
e.g.
SQL> alter database drop standby logfile group 3;
Drop all Standby Redolog Groups using above Command.

5. Drop the Data Guard Broker Configuration Files if used.

DG_BROKER_CONFIG_FILE1 and DG_BROKER_CONFIG_FILE2 Parameters define the Name and Location of the Data Guard Broker Configuration Files.


In Unix the default Values for DG_BROKER_CONFIG_FILE1 and DG_BROKER_CONFIG_FILE2 are:

$ORACLE_HOME/dbs/dr1<ORACLE_SID>.dat and
$ORACLE_HOME/dbs/dr2<ORACLE_SID>.dat

In Windows the default Values for DG_BROKER_CONFIG_FILE1 and DG_BROKER_CONFIG_FILE2 are:

$ORACLE_HOME/database/dr1<ORACLE_SID>.dat and
$ORACLE_HOME/database/dr2<ORACLE_SID>.dat.                                                                                                                                                                                                                           Or you could find the location and file names of Data Guard Broker Configuration Files by
SQL> show parameter DG_BROKER_CONFIG;
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 支持支持 反对反对
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|手机版|小黑屋|重庆思庄Oracle、Redhat认证学习论坛 ( 渝ICP备12004239号-4 )

GMT+8, 2024-11-16 08:06 , Processed in 0.098296 second(s), 21 queries .

重庆思庄学习中心论坛-重庆思庄科技有限公司论坛

© 2001-2020

快速回复 返回顶部 返回列表