重庆思庄Oracle、Redhat认证学习论坛

标题: 备库使用RMAN获得归档日志 [打印本页]

作者: 刘泽宇    时间: 2022-3-20 17:52
标题: 备库使用RMAN获得归档日志
原来在主备库上发现日志应用存在异常时,都是通过拷贝的方式将归档日志从主库传到备库,然后注册应用
在备库通过RMAN来获取归档日志更加简单
1.在主库确认归档序号

select NAME,DEST_ID,THREAD#,SEQUENCE#,COMPLETION_TIME,REGISTRAR,APPLIED,DELETED from v$ARCHIVED_LOG where SEQUENCE# between 44561 and 44566 and THREAD#=1 and DEST_ID=1;

2.在备库执行获取归档命令

rman target sys/oracle@primary auxiliary sys/oracle@standby
backup as copy archivelog sequence between 44561 and 44566 thread 1 auxiliary format '+DATA';
backup as copy archivelog sequence between 44159 and 44160 thread 2 auxiliary format '+DATA';

3.在备库注册归档,少量使用alter命令;多量使用catalog命令。

alter database register physical logfile '归档路径';
catalog start with '+DATA/dghxa/archivelog/';






欢迎光临 重庆思庄Oracle、Redhat认证学习论坛 (http://bbs.cqsztech.com/) Powered by Discuz! X3.2