ITPub博客

首页 > Linux操作系统 > Linux操作系统 > DG使用中遇到的几个错误

DG使用中遇到的几个错误

原创 Linux操作系统 作者:space6212 时间:2019-06-16 22:42:05 0 删除 编辑

最近,在使用10G的DG中遇到了几个错误(这里的错误主要指后台报错)。本文就这几个错误简单分析原因及解决方法:


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的速度,在恢复过程中清空备库的联机日志。

以上两个问题可以看作是一个问题,解决方法是在备库设置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 /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传送日志。

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/231499/viewspace-63827/,如需转载,请注明出处,否则将追究法律责任。

下一篇: 10G DG SWITCH OVER
请登录后发表评论 登录
全部评论

注册时间:2005-01-25

  • 博文量
    230
  • 访问量
    148537