标签:str 日志 sequence 建立 sele font 查看 表空间 反馈
由于主库表空间不足,同事给表空间增加数据文件,第二天收到反馈说备库未同步。
1、主、备查看归档序列号,发现主、备归档正常同步。
SQL>archive log list
2、在主库端查询v$archived_log视图,确认日志是否被应用
set lines 300 pages 300 col name for a20 select name,dest_id,thread#,sequence#,standby_dest,applied,registrar,completion_time from v$archived_log where standby_dest=‘YES‘ order by thread#,sequence#;
3、在备库查看接收到的被应用的redo,发现日志未被应用
SELECT SEQUENCE#,APPLIED FROM V$ARCHIVED_LOG ORDER BY SEQUENCE#;
4、处理方式:
现在备库中建立了对应的文件夹并赋权
将备库中STANDBY_FILE_MANAGEMENT选项设定为MANUAL
查找出对应的UNNAMED 文件
将UNNAMED文件重命名为指定需要新建的数据文件
将备库STANDBY_FILE_MANAGEMENT 恢复设置为auto
同步数据
show parameter STANDBY_FILE_MANAGEMENT ALTER SYSTEM SET STANDBY_FILE_MANAGEMENT=MANUAL; select name from v$datafile where name like ‘%UNNAMED%‘;
查询结果:
/u01/app/oracle/product/11gR2/dbhome_1/dbs/UNNAMED11 /u01/app/oracle/product/11gR2/dbhome_1/dbs/UNNAMED12
alter database create datafile ‘/u01/app/oracle/product/11.2.0/dbhome_1/dbs/UNNAMED11‘ as ‘/oradata/xxxxxxx11.dbf‘; recover managed standby database disconnect; select name from v$datafile; alter database create datafile ‘/u01/app/oracle/product/11.2.0/dbhome_1/dbs/UNNAMED12‘ as ‘/oradata/xxxxxxx12.dbf‘; recover managed standby database disconnect; select name from v$datafile;
ALTER SYSTEM SET STANDBY_FILE_MANAGEMENT=auto;
5、备库启用apply,接收来自主库的redo并apply
alter database recover managed standby database using current logfile disconnect from session;
6、取消同步
ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;
7、备库再次启用apply,接收来自主库的redo并apply
ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;
8、根据步骤1、2、3进行验证。
标签:str 日志 sequence 建立 sele font 查看 表空间 反馈
原文地址:https://www.cnblogs.com/connected/p/10919562.html