current REDO被删的处理

来源:互联网 发布:莳绘钢笔淘宝 编辑:程序博客网 时间:2024/05/21 15:05
1.current REDO被删除,alert警告日志内容:
Wed Jul 13 00:26:04 2011
Errors in file /oracle/app/oracle/admin/cicszj/bdump/cicszj_lgwr_5894.trc:
ORA-00313: open failed for members of log group 2 of thread 1
ORA-00312: online log 2 thread 1: '/oracle/app/oracle/oradata/cicszj/redo02.log'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Wed Jul 13 00:26:04 2011
Errors in file /oracle/app/oracle/admin/cicszj/bdump/cicszj_lgwr_5894.trc:
ORA-00313: open failed for members of log group 2 of thread 1
ORA-00312: online log 2 thread 1: '/oracle/app/oracle/oradata/cicszj/redo02.log'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Wed Jul 13 00:26:04 2011
LGWR: terminating instance due to error 313
Instance terminated by LGWR, pid = 5894

2.强制打开数据库,在使用强制打开数据库前,做好备份
SQL> conn / as sysdba
Connected to an idle instance.
SQL> startup nomount;
ORACLE instance started.

Total System Global Area  102202928 bytes
Fixed Size                   740912 bytes
Variable Size              75497472 bytes
Database Buffers           25165824 bytes
Redo Buffers                 798720 bytes
SQL> create pfile='/oracle/init.ora' from spfile;

File created.

SQL> shutdown immediate;
ORA-01507: database not mounted


ORACLE instance shut down.
SQL> startup mount pfile='/oracle/init.ora';
ORACLE instance started.

Total System Global Area  102202928 bytes
Fixed Size                   740912 bytes
Variable Size              75497472 bytes
Database Buffers           25165824 bytes
Redo Buffers                 798720 bytes
Database mounted.


SQL> recover database until cancel;
ORA-00279: change 70894 generated at 07/13/2011 00:24:49 needed for thread 1
ORA-00289: suggestion : /oracle/app/oracle/arch/1_4.dbf
ORA-00280: change 70894 for thread 1 is in sequence #4


Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
CANCEL
ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below
ORA-01194: file 1 needs more recovery to be consistent
ORA-01110: data file 1: '/oracle/app/oracle/oradata/cicszj/system01.dbf'


ORA-01112: media recovery not started

SQL> alter database open resetlogs;
alter database open resetlogs
*
ERROR at line 1:
ORA-01092: ORACLE instance terminated. Disconnection forced


通过观察alter日志,发现ORA-600 [4194]错误

Errors in file /oracle/app/oracle/admin/cicszj/bdump/cicszj_smon_6033.trc:
ORA-00600: internal error code, arguments: [4194], [58], [19], [], [], [], [], []
Wed Jul 13 00:28:59 2011
Errors in file /oracle/app/oracle/admin/cicszj/udump/cicszj_ora_6041.trc:
ORA-00600: internal error code, arguments: [4194], [71], [68], [], [], [], [], []
Wed Jul 13 00:29:02 2011
Errors in file /oracle/app/oracle/admin/cicszj/bdump/cicszj_smon_6033.trc:
ORA-00339: archived log does not contain any redo
ORA-00334: archived log: '/oracle/app/oracle/oradata/cicszj/redo02.log'
ORA-00607: Internal error occurred while making a change to a data block
ORA-00600: internal error code, arguments: [4194], [58], [19], [], [], [], [], []

关于ORA-00600 [4194]的解释:
ORA-600 [4194] "Undo Record Number Mismatch While Adding Undo Record" [ID 39283.1]

在启动Oracle的pfile文件中,添加:
*.undo_management='MANUAL'
*._corrupted_rollback_segments=('_SYSSMU1$','_SYSSMU2$','_SYSSMU3$','_SYSSMU4$','_SYSSMU5$','_SYSSMU6$','_SYSSMU7$','_SYSSMU8$','_SYSSMU9$','_SYSSMU10$')

其中回滚段,可以通过如下方法查看:
通过查看alert log或
strings system01.dbf | grep SYSSMU

继续通过上面的步骤打开,这次正常打开.

3.检查数据字典:
使用hcheck检查数据字典:参考文档Oracle Metalink (doc 101466.1)
SQL> conn / as sysdba
SQL> @hout.sql
SQL> @hcheck.sql

SQL> set serverout on
SQL> execute hcheck.full
HCheck Version 8i-11/1.70

Found 0 potential problems and 0 warnings

PL/SQL procedure successfully completed.

如果发现问题,做相应的处理
如果问题严重,需要做exp/imp,并重新建库

4.由于undo损坏,重建undo
SQL> drop tablespace undotbs1 including contents and datafiles;

Tablespace dropped.

SQL> create undo tablespace undotbs1 datafile '/oracle/app/oracle/oradata/cicszj/undotbs1.dbf' size 100M autoextend on;

Tablespace created.

5.使用spfile打开数据库


原创粉丝点击