oracle从adg物理备库备份数据库,恢复时候报错 file 1 was not restored from a sufficiently old backup
生产环境是rac+adg rac
在测试环境重新搭建了rac+单机adg,备份都能正常备份,恢复的时候总是报错,以scn恢复还是报错。
报错内容
Oracle Error: ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below ORA-01152: file 1 was not restored from a sufficiently old backup ORA-01110: data file 1: '/xyz/oradata/data_D-PWWDB_TS-SYSTEM_FNO-1'
同样的脚本,在主库备份都是正常的,能正常恢复过来,到备库就不行了。在备库备份rman会有告警,不能正常切换日志。
最后在还是在网上找到相关文档,有两种解决方案。经过测试发现,备库备份时候通过连接主库去切换日志是可以的,也是最简单的方式。
#!/bin/bassh # # Change <passwd> # <primary_db> # sqlplus -s "sys/<passwd>@<primary_db> as sysdba" <<EOF alter system archive log current; exit EOF
% chmod 755 /usr/local/bin/logswitch.sh
Rman> Configure controlfile autobackup on ;--------------> This would ensure Controlfile auto backup RMAN> backup database plus archivelog delete input; host "/usr/local/bin/logswitch.sh"; backup archivelog all delete input;
再去恢复的时候就正常恢复的。
其它更多内容请参考:http://blog.itpub.net/26736162/viewspace-2723840/
参考文档
-
( Doc ID 1616074.1) RMAN-06820 ORA-17629 During Backup at Standby Site
-
How to take consistent backups at standby site (文档 ID 1292126.1)
-
( Doc ID 1419923.1) Howto make a consistent RMAN backup in an Standby database in Active DataGuard mode
-
Step by Step method to create Primary/Standby Database from Standby Backup (文档 ID 1604251.1)
-
How to quickly check that Database is consistent after incomplete recovery (Point in Time Recovery) before OPEN RESETLOGS (文档 ID 1354256.1)
-
Benefits and Usage of RMAN with Standby Databases (文档 ID 602299.1)