AIX6.1,11.2.0.3
#############添加隐含参数################
*._allow_resetlogs_corruption=true
*._allow_error_simulation=true
alter system set "_allow_error_simulation"=true scope=spfile;
alter system set "_allow_resetlogs_corruption"=true scope=spfile;
#########################################
--检查数据文件和表空间状态
startup mount;
restore database;
select file#,name,status from v$datafile where status !='ONLINE';
select status,fuzzy,tablespace_name,name from v$datafile_header where status !='ONLINE';
select tablespace_name,status from dba_tablespaces;
select checkpoint_change# fromv$database;
select min(to_char(checkpoint_change#,'999999999999999')) "MIN_SCN",
max(to_char(checkpoint_change#,'999999999999999')) "MAX_SCN"
from v$datafile;
select min(to_char(checkpoint_change#,'999999999999999')) "MIN_SCN",
max(to_char(checkpoint_change#,'999999999999999')) "MAX_SCN"
from v$datafile_header;
在数据库启动过程中,当SystemCheckpoint SCN、Datafile Checkpoint SCN和Start SCN号都相同时,数据库可以正常启动。
alter database backup controlfile to trace as '/orabak/ctl_20130601.txt';
auto->manual:
alter session set events '10015 trace name adjust_scn level 10';
recover database using backup controlfile until cancel;
alter database backup controlfile to trace;
alter database open resetlogs;
select to_char(checkpoint_change#) from v$database;
select file#,to_char(checkpoint_change#) from v$datafile_header;
------------------------------------------------------------------
alter session set events 'immediate trace name CONTROLF level 10';
alter session set events 'immediate trace name FILE_HDRS level 10';
alter database backup controlfile to trace;
实验如下:
1.ORA-00600: internal error code, arguments: [2662], [0], [3165711515], [0],
SQL> alter database open;
alter database open
*
ERROR at line 1:
ORA-01092: ORACLE instance terminated. Disconnection forced
ORA-00704: bootstrap process failure
ORA-00704: bootstrap process failure
ORA-00600: internal error code, arguments: [2662], [0], [3165711515], [0],
[3165730123], [4194545], [], [], [], [], [], []
Process ID: 26607664
Session ID: 937 Serial number: 3
SQL> startup mount;
ORACLE instance started.
Total System Global Area 3.7413E+10 bytes
Fixed Size 2229304 bytes
Variable Size 3.3152E+10 bytes
Database Buffers 4160749568 bytes
Redo Buffers 98418688 bytes
Database mounted.
SQL> alter system set "_ktb_debug_flags"=8;
System altered.
SQL> alter session set events '10015 trace name adjust_scn level 2';
Session altered.
SQL> alter database open;
Database altered.
SQL>
2.ORA-01555: snapshot too old: rollback segment number 81 with name
SQL> alter session set events '10015 trace name adjust_scn level 2';
Session altered.
SQL> select min(to_char(checkpoint_change#,'999999999999999')) "MIN_SCN",
2 max(to_char(checkpoint_change#,'999999999999999')) "MAX_SCN"
3 from v$datafile;
MIN_SCN MAX_SCN
---------------- ----------------
3245185532 3260165046
SQL> SQL> select min(to_char(checkpoint_change#,'999999999999999')) "MIN_SCN",
2 max(to_char(checkpoint_change#,'999999999999999')) "MAX_SCN"
3 from v$datafile_header;
MIN_SCN MAX_SCN
---------------- ----------------
3260165046 3260165046
SQL> SQL>
SQL> recover database using backup controlfile until cancel;
ORA-00279: change 3260165046 generated at 06/01/2013 00:08:52 needed for thread
1
ORA-00289: suggestion : /oraarch/ARC_ERP5_3701_802575121_1.log
ORA-00280: change 3260165046 for thread 1 is in sequence #3701
Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
/oraarch/ARC_ERP5_3701_802575121_1.log
ORA-00279: change 3260507574 generated at 06/01/2013 00:22:28 needed for thread 1
ORA-00289: suggestion : /oraarch/ARC_ERP5_3702_802575121_1.log
ORA-00280: change 3260507574 for thread 1 is in sequence #3702
ORA-00278: log file '/oraarch/ARC_ERP5_3701_802575121_1.log' no longer needed
for this recovery
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: '+DATA/sgerp5/datafile/system.318.816829779'
ORA-01112: media recovery not started
SQL> select min(to_char(checkpoint_change#,'999999999999999')) "MIN_SCN",
2 max(to_char(checkpoint_change#,'999999999999999')) "MAX_SCN"
3 from v$datafile;
MIN_SCN MAX_SCN
---------------- ----------------
3260507574 3260507574
SQL> select min(to_char(checkpoint_change#,'999999999999999')) "MIN_SCN",
2 max(to_char(checkpoint_change#,'999999999999999')) "MAX_SCN"
3 from v$datafile_header;
MIN_SCN MAX_SCN
---------------- ----------------
3260507574 3260507574
SQL>
SQL> alter database open resetlogs;
alter database open resetlogs
*
ERROR at line 1:
ORA-01092: ORACLE instance terminated. Disconnection forced
ORA-00704: bootstrap process failure
ORA-00704: bootstrap process failure
ORA-00604: error occurred at recursive SQL level 1
ORA-01555: snapshot too old: rollback segment number 81 with name
"_SYSSMU81_3781980468$" too small
Process ID: 21364848
Session ID: 937 Serial number: 3
SQL>
日志信息:
Sat Jun 01 18:19:43 2013
ARC0 started with pid=26, OS id=21299200
ARC0: Archival started
LGWR: STARTING ARCH PROCESSES COMPLETE
ARC0: STARTING ARCH PROCESSES
Sat Jun 01 18:19:44 2013
ARC1 started with pid=27, OS id=19791878
Thread 1 opened at log sequence 1
Current log# 1 seq# 1 mem# 0: +DATA/sgerp5/onlinelog/group_1.376.816977895
Current log# 1 seq# 1 mem# 1: +DATA/sgerp5/onlinelog/group_1.390.816977899
Successful open of redo thread 1
MTTR advisory is disabled because FAST_START_MTTR_TARGET is not set
Sat Jun 01 18:19:44 2013
SMON: enabling cache recovery
Sat Jun 01 18:19:44 2013
ARC2 started with pid=28, OS id=21561526
ORA-01555 caused by SQL statement below (SQL ID: 4krwuz0ctqxdt, SCN: 0x0000.c25765bd):
select ctime, mtime, stime from obj$ where obj# = :1
Sat Jun 01 18:19:44 2013
ARC3 started with pid=29, OS id=10682564
ARC1: Archival started
ARC2: Archival started
ARC1: Becoming the 'no FAL' ARCH
ARC1: Becoming the 'no SRL' ARCH
ARC2: Becoming the heartbeat ARCH
Errors in file /u01/app_new/diag/rdbms/sgerp5/sgerp5/trace/sgerp5_ora_21364848.trc:
ORA-00704: bootstrap process failure
ORA-00704: bootstrap process failure
ORA-00604: error occurred at recursive SQL level 1
ORA-01555: snapshot too old: rollback segment number 81 with name "_SYSSMU81_3781980468$" too small
Errors in file /u01/app_new/diag/rdbms/sgerp5/sgerp5/trace/sgerp5_ora_21364848.trc:
ORA-00704: bootstrap process failure
ORA-00704: bootstrap process failure
ORA-00604: error occurred at recursive SQL level 1
ORA-01555: snapshot too old: rollback segment number 81 with name "_SYSSMU81_3781980468$" too small
Error 704 happened during db open, shutting down database
USER (ospid: 21364848): terminating the instance due to error 704
Instance terminated by USER, pid = 21364848
ORA-1092 signalled during: alter database open resetlogs...
opiodr aborting process unknown ospid (21364848) as a result of ORA-1092
Sat Jun 01 18:19:45 2013
ORA-1092 : opitsk aborting process
--重启
SQL> startup nomount;
ORACLE instance started.
Total System Global Area 3.7413E+10 bytes
Fixed Size 2229304 bytes
Variable Size 3.3152E+10 bytes
Database Buffers 4160749568 bytes
Redo Buffers 98418688 bytes
SQL> alter database mount;
Database altered.
SQL> alter database backup controlfile to trace;
alter database backup controlfile to trace
*
ERROR at line 1:
ORA-16433: The database must be opened in read/write mode.
SQL> alter database open;
alter database open
*
ERROR at line 1:
ORA-01092: ORACLE instance terminated. Disconnection forced
ORA-00600: internal error code, arguments: [2663], [0], [3263286590], [0],
[3263291555], [], [], [], [], [], [], []
Process ID: 15990956
Session ID: 937 Serial number: 1
SQL>
对于ORA-00600[2662]和ORA-00600[2663]错误,都是因为SCN号不一致导致的,需要adjust scn操作.
SQL> startup mount;
ORACLE instance started.
Total System Global Area 3.7413E+10 bytes
Fixed Size 2229304 bytes
Variable Size 3.3152E+10 bytes
Database Buffers 4160749568 bytes
Redo Buffers 98418688 bytes
Database mounted.
--alter system set "_ktb_debug_flags"=8;
SQL> alter session set events '10015 trace name adjust_scn level 10';
Session altered.
SQL> alter database open;
ERROR:
ORA-03113: end-of-file on communication channel
Process ID: 18088022
Session ID: 937 Serial number: 3
SQL>
日志信息:
Archived Log entry 4417 added for thread 1 sequence 5 ID 0xffffffffd6755364 dest 1:
[19923084] Successfully onlined Undo Tablespace 2.
Undo initialization finished serial:0 start:290210204 end:290210894 diff:690 (6 seconds)
Verifying file header compatibility for 11g tablespace encryption..
Verifying 11g file header compatibility for tablespace encryption completed
SMON: enabling tx recovery
Database Characterset is ZHS16GBK
No Resource Manager plan active
replication_dependency_tracking turned off (no async multimaster replication found)
ARC3: Archival started
ARC0: STARTING ARCH PROCESSES COMPLETE
Starting background process QMNC
Sat Jun 01 18:55:44 2013
QMNC started with pid=78, OS id=13762780
Exception [type: SIGSEGV, Address not mapped to object] [ADDR:0x141343B06] [PC:0x1000E1984, kgegpa()+36] [flags: 0x0, count: 1]
Exception [type: SIGSEGV, Address not mapped to object] [ADDR:0x141343B06] [PC:0x1000E1984, kgegpa()+36] [flags: 0x2, count: 2]
Exception [type: SIGSEGV, Address not mapped to object] [ADDR:0x141343B06] [PC:0x1000E1984, kgegpa()+36] [flags: 0x2, count: 2]
Sat Jun 01 18:55:44 2013
Errors in file /u01/app_new/diag/rdbms/sgerp5/sgerp5/trace/sgerp5_mmon_20316338.trc (incident=108965):
ORA-00600: internal error code, arguments: [4193], [], [], [], [], [], [], [], [], [], [], []
Incident details in: /u01/app_new/diag/rdbms/sgerp5/sgerp5/incident/incdir_108965/sgerp5_mmon_20316338_i108965.trc
Use ADRCI or Support Workbench to package the incident.
See Note 411.1 at My Oracle Support for error and packaging details.
Sat Jun 01 18:55:46 2013
Block recovery from logseq 6, block 956 to scn 10737439977
Recovery of Online Redo Log: Thread 1 Group 6 Seq 6 Reading mem 0
Mem# 0: +DATA/sgerp5/onlinelog/group_6.389.816977939
Mem# 1: +DATA/sgerp5/onlinelog/group_6.383.816977943
Block recovery stopped at EOT rba 6.959.16
Block recovery completed at rba 6.959.16, scn 2.2147505385
Block recovery from logseq 6, block 956 to scn 10737439976
Recovery of Online Redo Log: Thread 1 Group 6 Seq 6 Reading mem 0
Mem# 0: +DATA/sgerp5/onlinelog/group_6.389.816977939
Mem# 1: +DATA/sgerp5/onlinelog/group_6.383.816977943
Block recovery completed at rba 6.959.16, scn 2.2147505385
Sat Jun 01 18:55:46 2013
Shutting down instance (abort)
License high water mark = 32
USER (ospid: 10551412): terminating the instance
Instance terminated by USER, pid = 10551412
Sat Jun 01 18:55:47 2013
Instance shutdown complete
再次打开数据库:
SQL> startup
ORACLE instance started.
Total System Global Area 3.7413E+10 bytes
Fixed Size 2229304 bytes
Variable Size 3.3152E+10 bytes
Database Buffers 4160749568 bytes
Redo Buffers 98418688 bytes
Database mounted.
ORA-03113: end-of-file on communication channel
Process ID: 16122082
Session ID: 937 Serial number: 3
日志信息:
ORA-10388: parallel query server interrupt (failure)
ORA-00600: internal error code, arguments: [4198], [], [], [], [], [], [], [], [], [], [], []
Errors in file /u01/app_new/diag/rdbms/sgerp5/sgerp5/trace/sgerp5_p026_17105080.trc:
ORA-10388: parallel query server interrupt (failure)
Sat Jun 01 19:06:16 2013
Errors in file /u01/app_new/diag/rdbms/sgerp5/sgerp5/trace/sgerp5_p000_19464228.trc:
ORA-10388: parallel query server interrupt (failure)
ORA-00600: internal error code, arguments: [4198], [], [], [], [], [], [], [], [], [], [], []
Errors in file /u01/app_new/diag/rdbms/sgerp5/sgerp5/trace/sgerp5_p011_18284720.trc:
ORA-10388: parallel query server interrupt (failure)
Errors in file /u01/app_new/diag/rdbms/sgerp5/sgerp5/trace/sgerp5_p011_18284720.trc:
ORA-10388: parallel query server interrupt (failure)
Errors in file /u01/app_new/diag/rdbms/sgerp5/sgerp5/trace/sgerp5_p000_19464228.trc:
ORA-10388: parallel query server interrupt (failure)
ORA-00600: internal error code, arguments: [4198], [], [], [], [], [], [], [], [], [], [], []
Sat Jun 01 19:06:16 2013
此时数据已经打开,但不断的报错:
SQL> select status from v$instance;
STATUS
------------
OPEN
Sat Jun 01 19:25:27 2013
minact-scn: got error during useg scan e:1555 usn:3
minact-scn: useg scan erroring out with error e:1555
ORA-00600: internal error code, arguments: [4194], [], [], [], [], [], [], [], [], [], [], []
Use ADRCI or Support Workbench to package the incident.
也无法正常关闭:
SQL> shutdown immediate;
操作:
event = "10513 trace name context forever,level 2 : 10512 trace name context forever,level 1: 10511 trace name context forever,level 2: 10510 trace name context forever,level 1"
undo_management = manual
SQL> shutdown abort;
SQL> startup
ORACLE instance started.
Total System Global Area 3.7413E+10 bytes
Fixed Size 2229304 bytes
Variable Size 3.3152E+10 bytes
Database Buffers 4160749568 bytes
Redo Buffers 98418688 bytes
Database mounted.
Database opened.
SQL>
SQL>create undo tablespace UNDOTBS2 datafile size 1024M;
--错误信息
Sat Jun 01 19:56:11 2013
CREATE UNDO TABLESPACE undotbs2 DATAFILE
'+DATA' SIZE 20480M AUTOEXTEND ON NEXT 50M MAXSIZE 30720M
RETENTION NOGUARANTEE
BLOCKSIZE 8K
FLASHBACK ON
Sat Jun 01 19:56:54 2013
Errors in file /u01/app_new/diag/rdbms/sgerp5/sgerp5/trace/sgerp5_ora_19202100.trc (incident=141438):
ORA-00600: ě2?′?[4097], [71], [24], [53830], [], [], [], [], [], [], [], []
Incident details in: /u01/app_new/diag/rdbms/sgerp5/sgerp5/incident/incdir_141438/sgerp5_ora_19202100_i141438.trc
Use ADRCI or Support Workbench to package the incident.
See Note 411.1 at My Oracle Support for error and packaging details.
ORA-600 signalled during: CREATE UNDO TABLESPACE undotbs2 DATAFILE
'+DATA' SIZE 20480M AUTOEXTEND ON NEXT 50M MAXSIZE 30720M
RETENTION NOGUARANTEE
BLOCKSIZE 8K
FLASHBACK ON...
Sat Jun 01 19:57:01 2013
Starting background process SMCO
Sat Jun 01 19:57:01 2013
SMCO started with pid=73, OS id=4653094
Sat Jun 01 19:57:01 2013
Dumping diagnostic data in directory=[cdmp_20130601195701], requested by (instance=1, osid=19202100), summary=[incident=141438].
Sat Jun 01 19:57:02 2013
Dump continued from file: /u01/app_new/diag/rdbms/sgerp5/sgerp5/trace/sgerp5_ora_19202100.trc
ORA-00600: ě2?′?′?97], [71], [24], [53830], [], [], [], [], [], [], [], []
解决:
SQL> select tablespace_name, status, segment_name from dba_rollback_segs where status != 'OFFLINE';
TABLESPACE_NAME STATUS SEGMENT_NAME
------------------------------ ---------------- ------------------------------
SYSTEM ONLINE SYSTEM
UNDOTBS1 PARTLY AVAILABLE _SYSSMU136_3776625891$
UNDOTBS1 PARTLY AVAILABLE _SYSSMU134_3204151252$
UNDOTBS1 PARTLY AVAILABLE _SYSSMU131_1250106538$
UNDOTBS1 PARTLY AVAILABLE _SYSSMU124_3728929718$
UNDOTBS1 PARTLY AVAILABLE _SYSSMU121_704336811$
UNDOTBS1 PARTLY AVAILABLE _SYSSMU120_3320534217$
UNDOTBS1 PARTLY AVAILABLE _SYSSMU119_3368661701$
UNDOTBS1 PARTLY AVAILABLE _SYSSMU117_1593006648$
UNDOTBS1 PARTLY AVAILABLE _SYSSMU116_3584053428$
UNDOTBS1 PARTLY AVAILABLE _SYSSMU115_800565011$
undo_management='MANUAL'
_corrupted_rollback_segments=(_SYSSMU1_1508981096$,_SYSSMU2_1971546778$,_SYSSMU3_721539051$,_SYSSMU4_3849799403$,_SYSSMU5_4000746196$,_SYSSMU6_179823687$,_SYSSMU7_3892328048$,_SYSSMU8_4105802281$,_SYSSMU9_1510219536$,_SYSSMU10_3951869473$,_SYSSMU11_1202330240$,_SYSSMU12_1617713323$,_SYSSMU13_1359816937$,_SYSSMU14_2078039711$,_SYSSMU15_1538259293$,_SYSSMU16_3126366281$,_SYSSMU17_2553547900$,_SYSSMU18_1481844821$,_SYSSMU19_135756661$,_SYSSMU20_2322289537$)
_offline_rollback_segments=(_SYSSMU1_1508981096$,_SYSSMU2_1971546778$,_SYSSMU3_721539051$,_SYSSMU4_3849799403$,_SYSSMU5_4000746196$,_SYSSMU6_179823687$,_SYSSMU7_3892328048$,_SYSSMU8_4105802281$,_SYSSMU9_1510219536$,_SYSSMU10_3951869473$,_SYSSMU11_1202330240$,_SYSSMU12_1617713323$,_SYSSMU13_1359816937$,_SYSSMU14_2078039711$,_SYSSMU15_1538259293$,_SYSSMU16_3126366281$,_SYSSMU17_2553547900$,_SYSSMU18_1481844821$,_SYSSMU19_135756661$,_SYSSMU20_2322289537$)
SQL>alter system set undo_management=AUTO scope=spfile;
SQL>alter system set undo_tablespace=UNDOTBS2 scope=spfile;
SQL> shutdown immediate;
SQL> startup mount;