Oracle 11g Data Guard暂停物理备库的日志传输

1、在主库上面查看备份的归档路径

SQL> show parameter log_archive_dest_2

NAME     TYPE VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_2     string SERVICE=flame ASYNC VALID_FOR=
(ONLINE_LOGFILES,PRIMARY_ROLE)
 DB_UNIQUE_NAME=flame

SQL> show parameter log_archive_dest_state_2

NAME     TYPE VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_state_2     string ENABLE

2、通过设置 defer 参数来暂停主库对备库的日志传输

SQL> alter system set log_archive_dest_state_2 = 'defer';

System altered.

执行归档日志切换

SQL> alter system switch logfile;

System altered.

3、恢复主库到备份的日志传输,暂停日志传输后的归档日志会全部传输到备库,不会导致备库的归档日志 gap

SQL> alter system set log_archive_dest_state_2 = 'enable';

System altered.

参考文档:http://blog.itpub.net/26506993/viewspace-1850590/

你可能感兴趣的:(oracle)