trace文件:
从trace文件可以看到备库跟主库路径不一样,备库设置了convert参数,这个参数对以后的文件传输路径有效,但是对于已存在的文件就需要手动修改了,包括数据文件,日志文件,临时文件等。
下面介绍 备库redolog重建步骤:
SQL> alter system set standby_file_management=manual;
System altered.
SQL> alter database recover managed standby database cancel;
Database altered.
SQL> alter database drop logfile group 8;
alter database drop logfile group 8
*
ERROR at line 1:
ORA-01156: recovery or flashback in progress may need access to files
SQL> select group#,status,bytes/1024/1024 from v$log;
GROUP# STATUS BYTES/1024/1024
---------- ---------------- ---------------
1 UNUSED 256
2 UNUSED 256
3 UNUSED 256
8 CURRENT 256
5 UNUSED 256
6 UNUSED 256
4 UNUSED 256
SQL> alter database clear unarchived logfile '/crbank/dbs/data/oradata/dbs/redolog07.log';
alter database clear unarchived logfile '/crbank/dbs/data/oradata/dbs/redolog07.log'
*
ERROR at line 1:
ORA-01156: recovery or flashback in progress may need access to files
redolog 8 是当前正在使用的日志 所以不能直接删除,由于是备库 也不能切换日志,所以可以修改日志路径:
SQL> alter database rename file '/crbank/dbs/oradata/dbs/redo12.log' to '/crbank/dbs/data/oradata/dbs/redolog12.log'; --跟换路径
SQL> alter database add logfile group 1 '/crbank/dbs/data/oradata/dbs/redolog01.log' size 256m; --新增另外一组日志
Database altered.
alter system set standby_file_management=auto;
alter database recover managed standby database using current logfile disconnect;
select process,status,thread#,sequence#,block#,blocks from v$managed_standby where process!='ARCH';