INACTIVE日志组损坏的修复

实验步骤
1 删除inactive状态的日志文件;

2 恢复丢失的日志文件;

操作如下:
(1) 删除INACTIVE日志文件;
SYS@GMDBA> select group#,thread#,status,archived from v$log; 
GROUP# THREAD# STATUS ARC 
---------- ---------- ---------------- --- 
1 1 ACTIVE NO 
2 1 CURRENT NO 
3 1 INACTIVE YES 
SYS@GMDBA> !rm /u01/app/oracle/oradata/GMDBA/redo03.log 
SYS@GMDBA> shutdown immediate 
Database closed. 
Database dismounted. 
ORACLE instance shut down. 

(2) 重启后数据库无法启动; 
SYS@GMDBA> startup 
ORACLE instance started. 
Total System Global Area 422670336 bytes 
Fixed Size 1345380 bytes 
Variable Size 327157916 bytes 
Database Buffers 88080384 bytes 
Redo Buffers 6086656 bytes 
Database mounted. 
ORA-03113: end-of-file on communication channel 
Process ID: 20087 
Session ID: 125 Serial number: 5 

(3) Alert中报错说明了日志文件丢失; 
ARC1 started with pid=22, OS id=20091 
Errors in file /u01/app/oracle/diag/rdbms/gmdba/GMDBA/trace/GMDBA_lgwr_20050.trc: 
ORA-00313: open failed for members of log group 3 of thread 1 
ORA-00312: online log 3 thread 1: '/u01/app/oracle/oradata/GMDBA/redo03.log' 
ORA-27037: unable to obtain file status 
Linux Error: 2: No such file or directory 
Additional information: 3 
Errors in file /u01/app/oracle/diag/rdbms/gmdba/GMDBA/trace/GMDBA_lgwr_20050.trc: 
ORA-00313: open failed for members of log group 3 of thread 1 
ORA-00312: online log 3 thread 1: '/u01/app/oracle/oradata/GMDBA/redo03.log' 
ORA-27037: unable to obtain file status 
Linux Error: 2: No such file or directory 
Additional information: 3 
Errors in file /u01/app/oracle/diag/rdbms/gmdba/GMDBA/trace/GMDBA_ora_20087.trc: 
ORA-00313: open failed for members of log group 1 of thread 
ORA-00312: online log 3 thread 1: '/u01/app/oracle/oradata/GMDBA/redo03.log' 
Tue Dec 03 17:35:21 2013 
ARC2 started with pid=23, OS id=20093 
USER (ospid: 20087): terminating the instance due to error 313 
System state dump requested by (instance=1, osid=20087), summary=[abnormal instance termination]. 
System State dumped to trace file /u01/app/oracle/diag/rdbms/gmdba/GMDBA/trace/GMDBA_diag_20040.trc 
Dumping diagnostic data in directory=[cdmp_20131203173522], requested by (instance=1, osid=20087), summary=[abnormal instance termination]. 
Instance terminated by USER, pid = 20087 

(4) 重建日志文件; 

 [oracle@GMDBA dbs]$ sqlplus / as sysdba 
SQL*Plus: Release 11.2.0.3.0 Production on Tue Dec 3 17:35:56 2013 
Copyright (c) 1982, 2011, Oracle. All rights reserved. 
Connected to an idle instance. 
SYS@GMDBA> startup mount 
ORACLE instance started. 
Total System Global Area 422670336 bytes 
Fixed Size 1345380 bytes 
Variable Size 327157916 bytes 
Database Buffers 88080384 bytes 
Redo Buffers 6086656 bytes 
Database mounted. 
SYS@GMDBA> alter database clear logfile group 3; 
Database altered. 
SYS@GMDBA> alter database open; 
Database altered. 
SYS@GMDBA> set lines 200 
SYS@GMDBA> col member for a50 
SYS@GMDBA> select * from v$logfile; 
GROUP# STATUS TYPE MEMBER IS_ 
---------- ------- ------- ------------------------------------------------ 
1 ONLINE /u01/app/oracle/oradata/GMDBA/redo01.log NO 
2 ONLINE /u01/app/oracle/oradata/GMDBA/redo02.log NO 
3 ONLINE /u01/app/oracle/oradata/GMDBA/redo03.log NO 
SYS@GMDBA> 
注:如果日志组未归档,需要使用下面的命令 
SYS@GMDBA> alter database clear logfile group 3; 
alter database clear logfile group 3 

ERROR at line 1: 
ORA-00350: log 3 of instance GMDBA (thread 1) needs to be archived 
ORA-00312: online log 3 thread 1: '/u01/app/oracle/oradata/GMDBA/redo03.log' 


SYS@GMDBA> alter database clear unarchived logfile group 3; 
Database altered. 



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

转载于:http://blog.itpub.net/29319205/viewspace-1062215/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值