DataGuard主备归档存在GAP解决
目录
拷贝归档日志到从库,并进行注册
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';
重启主从
- 关闭
先关主库:
sql> shutdown immediate
再关从库:
sql> alter database recover managed standby database cancel; #暂停日志应用
sql> shutdown immediate;
- 启动
先启备库:
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; #启动实时应用
再启主库
sql> startup;