Standby数据库常见错误处理

1、执行:alter database recover managed standby database disconnect from session;
后台alert文件报错如下:
Errors in file /u01/oracle/admin/primary/bdump/primary_mrp0_2967.trc:
ORA-19527: physical standby redo log must be renamed
ORA-00312: online log 1 thread 1: '/u01/oracle/oradata/primary/redo01.log'

出现这个错误是因为oracle为了降低不小心清空主库联机日志的风险而引起的。
oracle不知道你的主备库分别是分别在一台机器上还是不同的机器上,如果是在相同的机器上,则有可能不小心把主库的联机清空了。

如果是先在主库switch logfile后,再alter database recover managed standby database disconnect from session;还会有如下报错:
Errors in file /u01/oracle/admin/primary/bdump/primary_mrp0_2967.trc:
ORA-00313: open failed for members of log group 1 of thread 1
ORA-00312: online log 1 thread 1: '/u01/oracle/oradata/primary/redo01.log'
ORA-27037: unable to obtain file status
Linux Error: 2: No such file or directory
Additional information: 3

这个错误会在10g出现,9i是不会出现的。因为做switch over的时候需要清空联机日志,在10g中,oracle为了加快swich over的速度,在恢复过程中清空备库的联机日志。

在最初创建备库时并没有redologs , 要指定参数 log_file_name_convert 后,重新alter database recover managed standby database disconnect from session; 后就进程会自动创建redo文件。

以上两个问题可以看作是一个问题,解决方法是在备库设置log_file_name_convert即可,如:
log_file_name_convert='/u01/primary/','/u01/primary/'

注意:即使是在目录结构完全一样的主备库中这个错误也会出现。

2、
执行:alter database recover managed standby database cancel;
后台alert文件有如下错误:
Errors in file /u01/oracle/admin/primary/bdump/primary_mrp0_2967.trc:
ORA-16037: user requested cancel of managed recovery operation
Recovery interrupted!
这个错误是正常的,不用在意。

3、Errors in file /opt/u01/app/oracle/admin/ora8/bdump/ora8_arc1_27096.trc:
ORA-16401: archivelog rejected by RFS

ORA-16401: archivelog rejected by RFS
Cause: An attempt was made to re-archive an existing archivelog. This usually happens because either a multiple primary database or standby database(s) or both are trying to archive to this standby database.
Action: See alert log and trace file for more details. No action is necessary; this is an informational statement provided to record the event for diagnostic purposes.

属于正常信息,通过观察备机的日志发现,redo还是被应用了。
如:
Thu Oct 16 15:18:44 2008
Redo Shipping Client Connected as PUBLIC
-- Connected User is Valid
RFS[6]: Assigned to RFS process 14001
RFS[6]: Identified database type as 'physical standby'
RFS[6]: Archivelog thread 1 sequence 7616 cannot be reused
Thu Oct 16 15:18:44 2008
Errors in file /u01/app/oracle/admin/ora8/udump/ora8_rfs_14001.trc:
ORA-16401: archivelog rejected by RFS
Thu Oct 16 15:19:14 2008
Media Recovery Log /opt/archive/1_7616_652298303.arc
Media Recovery Waiting for thread 1 sequence 7617 (in transit)



4、
Errors in file /u01/oracle/admin/primary/udump/primary_rfs_3380.trc:
ORA-00313: open failed for members of log group 4 of thread 1
ORA-00312: online log 4 thread 1: '/u01/oracle/oradata/primary/standbyredo04.log'
ORA-27037: unable to obtain file status
Linux Error: 2: No such file or directory
Additional information: 3
Sun Jun 24 15:36:05 2007
Errors in file /u01/oracle/admin/primary/udump/primary_rfs_3380.trc:
ORA-00313: open failed for members of log group 4 of thread 1
ORA-00312: online log 4 thread 1: '/u01/oracle/oradata/primary/standbyredo04.log'
ORA-27037: unable to obtain file status
Linux Error: 2: No such file or directory
Additional information: 3
.......
......
Sun Jun 24 15:36:05 2007
Errors in file /u01/oracle/admin/primary/udump/primary_rfs_3380.trc:
ORA-00313: open failed for members of log group 7 of thread 1
ORA-00312: online log 7 thread 1: '/u01/oracle/oradata/primary/standbyredo7.log'
ORA-27037: unable to obtain file status
Linux Error: 2: No such file or directory
Additional information: 3
Sun Jun 24 15:36:05 2007
Errors in file /u01/oracle/admin/primary/udump/primary_rfs_3380.trc:
ORA-00313: open failed for members of log group 7 of thread 1
ORA-00312: online log 7 thread 1: '/u01/oracle/oradata/primary/standbyredo7.log'
ORA-27037: unable to obtain file status
Linux Error: 2: No such file or directory
Additional information: 3
RFS[1]: Unable to open standby log 7: 313
RFS[1]: No standby redo logfiles created
RFS[1]: Archived Log: '/u01/archivelog/1_12_626106231.dbf'
Sun Jun 24 15:36:07 2007
Redo Shipping Client Connected as PUBLIC

出现这个错误主要是因为在备份前主库创建了standby redo log,备库是根据主库的信息创建的,一开始它是包含了主库的standby redo log信息,如果主库设置的日志传送方式是LGWR,当主库发生日志切换时,备库的RFS会尝试使用standby redo log来存储主库传送过来的日志,因为此时备库实际上是不存在standby redo log的,所以备库会报错。当备库尝试打开字典信息的所有standby redo log失败以后,备库会自动把日志传送方式转为ARCN,并同时清除数据字典中的standby redo log信息。

下面是清除standby redo log信息前的数据字典信息:
SQL> select * from v$logfile;

GROUP# STATUS TYPE MEMBER IS_
---------- ------- ------- ------------------------------------------------------------ ---
1 ONLINE /u01/oracle/oradata/primary/redo01.log NO
2 ONLINE /u01/oracle/oradata/primary/redo02.log NO
3 ONLINE /u01/oracle/oradata/primary/redo03.log NO
4 STANDBY /u01/oracle/oradata/primary/standbyredo04.log NO
5 STANDBY /u01/oracle/oradata/primary/standbyredo5.log NO
6 STANDBY /u01/oracle/oradata/primary/standbyredo6.log NO
7 STANDBY /u01/oracle/oradata/primary/standbyredo7.log NO

7 rows selected.

下面的信息是在备库尝试打开standby redo log后的数据字典信息:

SQL> select * from v$logfile;

GROUP# STATUS TYPE MEMBER IS_
---------- ------- ------- ------------------------------------------------------------ ---
1 ONLINE /u01/oracle/oradata/primary/redo01.log NO
2 ONLINE /u01/oracle/oradata/primary/redo02.log NO
3 ONLINE /u01/oracle/oradata/primary/redo03.log NO

注意的是:当你在备库添加了standby redo log后,oracle在下一次日志切换时会重新用LGWR传送日志。

 

posted @ 2010-10-14 12:26  无双的小宝  阅读(594)  评论(0编辑  收藏  举报