OS: SunOS sol2 5.10 Generic_127128-11 i86pc i386 i86pc
DB:10gR2
五一期间突然停电,造成物理DG的两台服务器掉电。重启服务器,先启动主库正常,然后启动备库到mount状态下。接着开启应用日志进程:alter database recover managed standby database disconnect from session。 查看alert日志发现一直在等待一个sequence 78的归档:
Tue May 5 15:48:44 2009
MRP0: Background Managed Standby Recovery process started (sjh10g)
Managed Standby Recovery not using Real Time Apply
parallel recovery started with 2 processes
Media Recovery Waiting for thread 1 sequence 78
查看备库,78这个归档已经传过来了。既然这样为啥还样等待?手工注册试一下:
SQL> ALTER DATABASE REGISTER PHYSICAL LOGFILE '/standbyarchive/1_78_682449456.dbf';
ALTER DATABASE REGISTER PHYSICAL LOGFILE '/standbyarchive/1_78_682449456.dbf'
*
ERROR at line 1:
ORA-00332: archived log is too small - may be incompletely archived
ORA-00334: archived log: '/standbyarchive/1_78_682449456.dbf'
--不能注册,提示这个归档太小。跟主库比较了一下大小,发现确实大小不一样,跟原库比较这个归档大不少。
$ ls -al 1_78_682449456.dbf --原库的归档
-rw-r----- 1 oracle dba 16393728 May 5 15:43 1_78_682449456.dbf
# ls -al 1_78_682449456.dbf.bak --备库的归档
-rw-r----- 1 oracle dba 52429312 May 1 10:34 1_78_682449456.dbf
--重新把原库的归档ftp到备库进行注册:
SQL> ALTER DATABASE REGISTER PHYSICAL LOGFILE '/standbyarchive/1_78_682449456.dbf';
Database altered.
同时观察alert文件:
Tue May 5 16:18:05 2009
ALTER DATABASE REGISTER PHYSICAL LOGFILE '/standbyarchive/1_78_682449456.dbf'
Tue May 5 16:18:05 2009
There are 1 logfiles specified.
ALTER DATABASE REGISTER [PHYSICAL] LOGFILE
Completed: ALTER DATABASE REGISTER PHYSICAL LOGFILE '/standbyarchive/1_78_682449456.dbf'
Tue May 5 16:18:07 2009
Media Recovery Log /standbyarchive/1_78_682449456.dbf
--OK,已经应用了。
接着在主库做日志切换,继续观察备库的alert:
Tue May 5 16:19:07 2009
Media Recovery Waiting for thread 1 sequence 79
--一直在等待,查看备库的归档79并没有传过来。奇怪。手工ftp 79到备库是可以应用的。因为掉电前DG都是正常的,所以排除参数设置问题。但还是检查了一下。
log_archive_dest_1 string LOCATION=/10garchive/ VALID_FO
R=(ALL_LOGFILES,ALL_ROLES) DB_
UNIQUE_NAME=sjh10g
log_archive_dest_2 string SERVICE=sjh10gstby LGWR ASYNC
VALID_FOR=(ONLINE_LOGFILES,PRI
MARY_ROLE) DB_UNIQUE_NAME=sjh1
0gstby
log_archive_dest_state_1 string ENABLE
log_archive_dest_state_2 string ENABLE
百思不得其解后,发现自己犯了一个相当低级的错误。哈哈,监听器还没启动。启动监听器后一切OK。
阅读(3424) | 评论(0) | 转发(0) |