- 精华
- 0
- 帖子
- 0
- 威望
- 0 点
- 积分
- 35 点
- 种子
- 0 点
- 注册时间
- 2010-5-9
- 最后登录
- 2020-1-13
|
05月20日 下午数据库执行情过程记录
1、查看磁盘情况 Df-h
Sun Microsystems Inc. SunOS 5.9 Generic May 2002You have new mail.Sourcing //.profile-EIS.....root@SMMUDBSP # df -hFilesystem size used avail capacity Mounted on/dev/md/dsk/d0 9.8G 9.6G 194M 99% //proc 0K 0K 0K 0% /procmnttab 0K 0K 0K 0% /etc/mnttabfd 0K 0K 0K 0% /dev[表情]swap 15G 216K 15G 1% [表情]ar/runswap 15G 0K 15G 0% /tmp/dev/md/dsk/d20 67G 36G 31G 54% /app/dev/md/dsk/d30 67G 31G 36G 47% /data/dev/did/dsk/d5s6 466M 4.7M 415M 2% /global/.devices/n/dev/md/ora-set/dsk/d0 295G 261G 32G 90% /appdata
2、进入ORACLE,启动ORACLE时报错:
root@SMMUDBSP # su - oracleSun Microsystems Inc. SunOS 5.9 Generic May 2002$ sqlplus/nologSQL*Plus: Release 9.2.0.1.0 - Production on Thu May 20 12:45:11 2010Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.SQL> connect / as sysdbaConnected to an idle instance.SQL> shutdown abortORACLE instance shut down.SQL> startupORACLE instance started.Total System Global Area 1410828920 bytesFixed Size 731768 bytesVariable Size 570425344 bytesDatabase Buffers 838860800 bytesRedo Buffers 811008 bytesDatabase mounted.ORA-00368: checksum error in redo log blockORA-00353: log corruption near block 110757 change 628620367 time 05/101:26:10ORA-00312: online log 1 thread 1: '/appdata/oradata/SMMUCS/redo01.log'SQL> startupORA-01081: cannot start already-running ORACLE - shut it down firstSQL> shutdown abortORACLE instance shut down.SQL> startupORACLE instance started.Total System Global Area 1410828920 bytesFixed Size 731768 bytesVariable Size 570425344 bytesDatabase Buffers 838860800 bytesRedo Buffers 811008 bytesDatabase mounted.ORA-00368: checksum error in redo log blockORA-00353: log corruption near block 110757 change 628620367 time 05/101:26:10ORA-00312: online log 1 thread 1: '/appdata/oradata/SMMUCS/redo01.log'
3、再次登录ORACLE,查看LOG信息
sqlplus /logconnect / as sysdbaarchive log listSQL> archive log listDatabase log mode Archive ModeAutomatic archival EnabledArchive destination /appdata/oraarchOldest online log sequence 10244Next log sequence to archive 10246Current log sequence 10246SQL> select group#,status,members,archived from v$log; GROUP# STATUS MEMBERS ARC---------- ---------------- ---------- --- 1 CURRENT 1 NO 2 INACTIVE 1 YES 3 INACTIVE 1 YES
SQL> archive log listDatabase log mode Archive ModeAutomatic archival EnabledArchive destination /appdata/oraarchOldest online log sequence 10244Next log sequence to archive 10246Current log sequence 10246SQL> select group#,status,members,archived from v$log; GROUP# STATUS MEMBERS ARC---------- ---------------- ---------- --- 1 CURRENT 1 NO 2 INACTIVE 1 YES 3 INACTIVE 1 YES
4、aler
alter database clear unarchived logfile group 1;
5、停止运行、开始运行
SQL>shutdown SQL>startup
SQL>database dismounted
SQL>oracle instance shut down
SQL>startup
Total System Global Area 1410828920 bytesFixed Size 731768 bytesVariable Size 570425344 bytesDatabase Buffers 838860800 bytesRedo Buffers 811008 bytesDatabase mounted.ORA-00368: checksum error in redo log blockORA-00353: log corruption near block 110757 change 628620367 time 05/101:26:10ORA-00312: online log 1 thread 1: '/appdata/oradata/SMMUCS/redo01.log'
5、alter
alter database clear unarchived logfile group 1;
error at line 1:ora-01624:log 1 needed for crash recovery of thread 1ora-00312:online log 1 thread 1 : '/appdata/oradata/smmucs/redo01.log'
6、recover
SQL> recover database until cancel ;ORA-00279: change 628592477 generated at 05/18/2010 17:54:09 needed for thread1ORA-00289: suggestion : /appdata/oraarch/1_10246.dbfORA-00280: change 628592477 for thread 1 is in sequence #10246Specify log: {<RET>=suggested | filename | AUTO | CANCEL}ORA-00308: cannot open archived log '/appdata/oraarch/1_10246.dbf'ORA-27037: unable to obtain file statusSVR4 Error: 2: No such file or directoryAdditional information: 3ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error belowORA-01194: file 1 needs more recovery to be consistentORA-01110: data file 1: '/appdata/oradata/SMMUCS/system01.dbf'
6、找1_10246.dbf归档文件,不存在,归档文件只到1_10245.dbf
7、在Oracle目录下查看admin->bdump->alert*.log文件
8、recover
SQL> recover database until cancel ;ORA-00279: change 628592477 generated at 05/18/2010 17:54:09 needed for thread1ORA-00289: suggestion : /appdata/oraarch/1_10246.dbfORA-00280: change 628592477 for thread 1 is in sequence #10246Specify log: {<RET>=suggested | filename | AUTO | CANCEL}ORA-00308: cannot open archived log '/appdata/oraarch/1_10246.dbf'ORA-27037: unable to obtain file statusSVR4 Error: 2: No such file or directoryAdditional information: 3ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error belowORA-01194: file 1 needs more recovery to be consistentORA-01110: data file 1: '/appdata/oradata/SMMUCS/system01.dbf'
9、alter
SQL> alter database open resetlogs ;alter database open resetlogs*ERROR at line 1:ORA-01194: file 1 needs more recovery to be consistentORA-01110: data file 1: '/appdata/oradata/SMMUCS/system01.dbf'
10、recover
SQL> recover database ;ORA-00283: recovery session canceled due to errorsORA-00368: checksum error in redo log blockORA-00353: log corruption near block 110757 change 628620367 time 05/19/201001:26:10ORA-00312: online log 1 thread 1: '/appdata/oradata/SMMUCS/redo01.log'
11、recover
SQL> recover database using backup controlfile until cancel ;ORA-00279: change 628596261 generated at 05/18/2010 17:54:09 needed for thread1ORA-00289: suggestion : /appdata/oraarch/1_10246.dbfORA-00280: change 628596261 for thread 1 is in sequence #10246Specify log: {<RET>=suggested | filename | AUTO | CANCEL}ORA-00308: cannot open archived log '/appdata/oraarch/1_10246.dbf'ORA-27037: unable to obtain file statusSVR4 Error: 2: No such file or directoryAdditional information: 3ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error belowORA-01194: file 1 needs more recovery to be consistentORA-01110: data file 1: '/appdata/oradata/SMMUCS/system01.dbf'
12、alter
SQL>alter database open noresetlogs;
error at line 1:ora-01588: must use RESETLOGS option for database open
13、重启
SQL>shutdown;SQL>startup nomount;
SQL> startup nomount ;ORACLE instance started.Total System Global Area 1410828920 bytesFixed Size 731768 bytesVariable Size 570425344 bytesDatabase Buffers 838860800 bytesRedo Buffers 811008 bytesSQL> alter database open noresetlogs ;alter database open noresetlogs*ERROR at line 1:ORA-01507: database not mounted
SQL>alter database mount;
database altered.
SQL>alter database open noresetlogs; error at line 1:ora-01588:must use resetlogs option for database open
14、修改admin\???\pfile下的init.ora文件,打开后最后加一句,再执行:
_allow_resetlogs_corruption=true
SQL>shutdown;ORA-01109: database not openDatabase dismounted.ORACLE instance shut down.SQL> startup mount ;ORACLE instance started.Total System Global Area 1410828920 bytesFixed Size 731768 bytesVariable Size 570425344 bytesDatabase Buffers 838860800 bytesRedo Buffers 811008 bytesDatabase mounted.SQL> recover database until cancel ;ORA-00283: recovery session canceled due to errorsORA-01610: recovery using the BACKUP CONTROLFILE option must be done
SQL> recover database using backup controlfile until cancel ;ORA-00279: change 628596261 generated at 05/18/2010 17:54:09 needed for thread1ORA-00289: suggestion : /appdata/oraarch/1_10246.dbfORA-00280: change 628596261 for thread 1 is in sequence #10246Specify log: {<RET>=suggested | filename | AUTO | CANCEL}ORA-00308: cannot open archived log '/appdata/oraarch/1_10246.dbf'ORA-27037: unable to obtain file statusSVR4 Error: 2: No such file or directoryAdditional information: 3ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error belowORA-01194: file 1 needs more recovery to be consistentORA-01110: data file 1: '/appdata/oradata/SMMUCS/system01.dbf'
SQL>alter database open noresetlogs;
ora-01588: must use resetlogs option ofr database open
SQL>alter database open resetlogs;alter database open resetlogs*ERROR at line 1:ORA-01194: file 1 needs more recovery to be consistentORA-01110: data file 1: '/appdata/oradata/SMMUCS/system01.dbf'
SQL>shutdown;SQL>startup mount;
SQL>alter database open resetlogs;ERROR at line 1:ORA-01194: file 1 needs more recovery to be consistentORA-01110: data file 1: '/appdata/oradata/SMMUCS/system01.dbf'
SQL>shutdown
SQL>oracle instance shut down.
SQL>startup
oar-01589:must use resetlogs or nogesetlogs option for database open
SQL>alter system set "_allow_resetlogs_corruption"=true scope=spfile;
SQL>shutdown
SQL>startup
ORACLE instance started.Total System Global Area 1410828920 bytesFixed Size 731768 bytesVariable Size 570425344 bytesDatabase Buffers 838860800 bytesRedo Buffers 811008 bytesDatabase mounted.ORA-01589: must use RESETLOGS or NORESETLOGS option for database open
SQL> alter system set "_allow_resetlogs_corruption"=true scope=spfile;System altered.SQL> shutdownORA-01109: database not openDatabase dismounted.ORACLE instance shut down.
SQL> startupORACLE instance started.
Total System Global Area 1410828920 bytesFixed Size 731768 bytesVariable Size 570425344 bytesDatabase Buffers 838860800 bytesRedo Buffers 811008 bytesDatabase mounted.ORA-01589: must use RESETLOGS or NORESETLOGS option for database openSQL> recover database using backup controlfile until cancel ;ORA-00279: change 628596261 generated at 05/18/2010 17:54:09 needed for thread1ORA-00289: suggestion : /appdata/oraarch/1_10246.dbfORA-00280: change 628596261 for thread 1 is in sequence #10246Specify log: {<RET>=suggested | filename | AUTO | CANCEL}ORA-00308: cannot open archived log '/appdata/oraarch/1_10246.dbf'ORA-27037: unable to obtain file statusSVR4 Error: 2: No such file or directoryAdditional information: 3ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error belowORA-01194: file 1 needs more recovery to be consistentORA-01110: data file 1: '/appdata/oradata/SMMUCS/system01.dbf'
SQL>alter database open resetlogs;
ora-03113:end-of-file on communication channel
SQL>shutdown
SQL>startup
结果:service handle not initialized
结果:internal error. hostdef extension doesn't exist
SQL>sqlplus /nolog
SQL>connect / as sysdbaSQL>startup
结果:end-of-file
on communication channel
15、关闭数据库
SQL>shutdown abort. |
|