11g data guard(LOGICAL STANDBY)配置

联系:手机/微信(+86 17813235971) QQ(107644445)QQ咨询惜分飞

标题:11g data guard(LOGICAL STANDBY)配置

作者:惜分飞©版权所有[未经本人同意,不得以任何形式转载,否则有进一步追究法律责任的权利.]

1、Create a Physical Standby Database
11g data guard(PHYSICAL STANDBY)配置

2、Stop Redo Apply on the Physical Standby Database
ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;

3、Prepare the Primary Database to Support a Logical Standby Database
1)Prepare the Primary Database for Role Transitions

*.log_archive_dest_1='LOCATION=/u01/archive valid_for=(online_logfiles,all_roles) db_unique_name=first'
*.log_archive_dest_3='LOCATION=/u01/archive/standby VALID_FOR=(STANDBY_LOGFILES,STANDBY_ROLE) DB_UNIQUE_NAME=first'
*.log_archive_dest_state_3='enable'
--其他不修改

2)Build a Dictionary in the Redo Data
EXECUTE DBMS_LOGSTDBY.BUILD;

4、Transition to a Logical Standby Database
1)Convert to a Logical Standby Database
ALTER DATABASE RECOVER TO LOGICAL STANDBY db_name;
Note:
(1)如果数据库是open状态,需要重启,然后置于mount状态
(2)取消使用:RECOVER MANAGED STANDBY DATABASE CANCEL;
(3)如果执行到一半,然后取消,导致原物理库损坏(不能同步),从主库中重新生成备库的control file,然后启动物理库同步

2)Adjust Initialization Parameters for the Logical Standby Database

SHUTDOWN;
STARTUP MOUNT;
alter system set log_archive_dest_3='LOCATION=/u01/archive/standby VALID_FOR=(STANDBY_LOGFILES,STANDBY_ROLE) DB_UNIQUE_NAME=second';
alter system set log_archive_dest_1='LOCATION=/u01/archive valid_for=(online_logfiles,all_roles) db_unique_name=second';
alter system set LOG_ARCHIVE_DEST_STATE_3='ENABLE';

5、Open the Logical Standby Database
ALTER DATABASE OPEN RESETLOGS;
–开启实时应用
ALTER DATABASE START LOGICAL STANDBY APPLY IMMEDIATE;
–开启应用
ALTER DATABASE START LOGICAL STANDBY APPLY;
–关闭应用
ALTER DATABASE STOP LOGICAL STANDBY APPLY;

此条目发表在 Data Guard 分类目录。将固定链接加入收藏夹。

评论功能已关闭。