0%

DataGuard主备归档存在GAP解决

拷贝归档日志到从库,并进行注册

1
2
sql> ALTER DATABASE REGISTER PHYSICAL LOGFILE '/data/oracle/archivelog/1_758_991156185.dbf';
sql> ALTER DATABASE REGISTER PHYSICAL LOGFILE '/data/oracle/archivelog/1_759_991156185.dbf';

重启主从

1) 关闭

先关主库:

1
sql> shutdown immediate

再关从库:

1
2
sql> alter database recover managed standby database cancel; #暂停日志应用
sql> shutdown immediate;

2) 启动

先启备库:

1
2
3
4
sql> startup nomount;
sql> alter database mount standby database;
sQL> alter database open read only;
sql> alter database recover managed standby database using current logfile disconnect from session; #启动实时应用

再启主库

1
sql> startup;
-------------    本文结束  感谢您的阅读    -------------