ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 重建physical standby redo log异常

重建physical standby redo log异常

原创 Linux操作系统 作者:yangzhangyue 时间:2013-07-10 16:30:08 0 删除 编辑
今天在同事搭建的物理备库上重建redo  log文件遇到一个小问题,记录如下:
select f.group#,member,thread#,l.ARCHIVED,l.STATUS,f.STATUS,l.bytes/1024/1024  from v$logfile f, v$log l where f.GROUP#=l.GROUP#;   

    GROUP# MEMBER                                      THREAD# ARC STATUS           STATUS  L.BYTES/1024/1024
---------- ---------------------------------------- ---------- --- ---------------- ------- -----------------
         1 /u03/oradata/myora/redo01_1.log                   1 YES CLEARING                               100
         1 /u03/oradata/myora/redo01_2.log                   1 YES CLEARING                               100
         2 /u03/oradata/myora/redo02_1.log                   1 YES CLEARING                               100
         2 /u03/oradata/myora/redo02_2.log                   1 YES CLEARING                               100
         3 /u03/oradata/myora/redo03_1.log                   1 YES CLEARING                               100
         3 /u03/oradata/myora/redo03_2.log                   1 YES CLEARING                               100
         4 /u03/oradata/myora/redo04_1.log                   1 YES CLEARING_CURRENT                       100
         4 /u03/oradata/myora/redo04_2.log                   1 YES CLEARING_CURRENT                       100

8 rows selected.

Elapsed: 00:00:00.02
15:43:31 idle>ALTER DATABASE drop logfile group 1;
ALTER DATABASE drop logfile group 1
*
ERROR at line 1:
ORA-01156: recovery in progress may need access to files

ALTER DATABASE CLEAR LOGFILE GROUP 1;

尝试clear logfile;
16:23:30 idle>ALTER DATABASE CLEAR LOGFILE GROUP 1;
ALTER DATABASE CLEAR LOGFILE GROUP 1
*
ERROR at line 1:
ORA-19527: physical standby redo log must be renamed
ORA-00312: online log 1 thread 1: '/u03/oradata/myora/redo01_1.log'

提示物理备库的redo log必须rename,我是设置了log_file_name_convert
解决的。
16:26:52 idle>alter system set log_file_name_convert='/u03','+DATA' scope=spfile;

System altered.

Elapsed: 00:00:00.01
16:27:07 idle>shutdown immediate
ORA-01109: database not open


Database dismounted.
ORACLE instance shut down.
16:27:42 idle>startup mount
ORACLE instance started.

Total System Global Area  629145600 bytes
Fixed Size                  2086064 bytes
Variable Size             167775056 bytes
Database Buffers          452984832 bytes
Redo Buffers                6299648 bytes
Database mounted.
16:28:22 idle>ALTER DATABASE drop logfile group 1; 
ALTER DATABASE drop logfile group 1
*
ERROR at line 1:
ORA-01624: log 1 needed for crash recovery of instance myora (thread 1)
ORA-00312: online log 1 thread 1: '+DATA/oradata/myora/redo01_1.log'
ORA-00312: online log 1 thread 1: '+DATA/oradata/myora/redo01_2.log'


Elapsed: 00:00:00.01
16:28:44 idle>ALTER DATABASE CLEAR LOGFILE GROUP 1;                                                                                         

Database altered.

Elapsed: 00:00:01.89
16:34:19 idle>ALTER DATABASE drop logfile group 1;

Database altered.

Elapsed: 00:00:00.01
16:57:15 idle>select f.group#,member,thread#,l.ARCHIVED,l.STATUS,f.STATUS,l.bytes/1024/1024  from v$logfile f, v$log l where f.GROUP#=l.GROUP#;

    GROUP# MEMBER                                      THREAD# ARC STATUS           STATUS  L.BYTES/1024/1024
---------- ---------------------------------------- ---------- --- ---------------- ------- -----------------
         2 +DATA/oradata/myora/redo02_1.log                  1 YES CLEARING                               100
         2 +DATA/oradata/myora/redo02_2.log                  1 YES CLEARING                               100
         3 +DATA/oradata/myora/redo03_1.log                  1 YES CLEARING                               100
         3 +DATA/oradata/myora/redo03_2.log                  1 YES CLEARING                               100
         4 +DATA/oradata/myora/redo04_1.log                  1 YES CLEARING_CURRENT                       100
         4 +DATA/oradata/myora/redo04_2.log                  1 YES CLEARING_CURRENT                       100

6 rows selected.
16:57:22 idle>ALTER DATABASE ADD LOGFILE THREAD 1 group 1 ('+DATA/oradata/myora/redo01_01.log','+DATA/oradata/myora/redo01_02.log') SIZE 100M;

Database altered.

Elapsed: 00:00:01.84

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

上一篇: awr 日志
请登录后发表评论 登录
全部评论

注册时间:2013-07-09

  • 博文量
    36
  • 访问量
    219764