DG主库、从库归档记录不一致以及相关命令

版权声明:六兮原创 https://blog.csdn.net/qq_39135609/article/details/85689206

紧接上文,测试DG时主从库的归档记录不一样,以下是解决方法

一、清除主库的归档记录(备库最好也执行一下):
 

SQL>execute sys.dbms_backup_restore.resetCfileSection(11);

然后进入rman执行:

RMAN>catalog db_recovery_file_dest;

RMAN>exit

然后进入sql命令查看:

SQL>select sequence#,applied from v$archived_log order by sequence# asc;

  未选定行

之后switch切换日志测试:
 

SQL>alter system switch logfile;

SQL>select sequence#,applied from v$archived_log order by sequence# asc;

二、DG中的相关命令:

关闭MRP进程(停止应用日志):
 

ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;

开启MRP进程(开启应用日志):
 

ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT FROM SESSION;

查看应用日志延迟时间:
 

select value from v$dataguard_stats where name='apply lag';

物理standby取消延迟应用:

ALTER DATABASE RECOVER MANAGED STANDBY DATABASE NODELAY;

删除两天前的归档日志:
 

rman target /
delete noprompt archivelog until time 'sysdate-2' all;

 

展开阅读全文

没有更多推荐了,返回首页