因为存储离线造成的ORA-600(2662)错误的解决

前两天客户的存储突然离线,后造成数据库无法打开,采用隐含参数的方法打开又碰到ORA-600错误,最后采用设置EVENTS的方式解决。

 

产生问题的根源在于存储离线后,数据库异常down,造成控制文件的SCN与数据文件头的SCN不一致,数据库无备份,无归档日志,且重做日志已被覆盖,只能尝试

做不完全恢复,丢失数据必然,不过还好,5分钟左右的数据是客户允许的范围内


尝试恢复数据库:

SQL> CONN /@YTK AS SYSDBA
已连接到空闲例程。
SQL> STARTUP MOUNT
ORACLE 例程已经启动。

Total System Global Area  251658240 bytes
Fixed Size                  1290012 bytes
Variable Size             167772388 bytes
Database Buffers           75497472 bytes
Redo Buffers                7098368 bytes
数据库装载完毕。
SQL> RECOVER DATABASE UNTIL CANCEL;
ORA-00279: 更改 5706539056 (在 12/11/2007 15:49:26 生成) 对于线程 1 是必需的
ORA-00289: 建议: E:\ORACLE\ORADATA\YTK\ARCHIVELOG\ARC01333_0577472831.001
ORA-00280: 更改 5706539056 (用于线程 1) 在序列 #1333 中


指定日志: {=suggested | filename | AUTO | CANCEL}
CANCEL
ORA-01547: 警告: RECOVER 成功但 OPEN RESETLOGS 将出现如下错误
ORA-01194: 文件 1 需要更多的恢复来保持一致性
ORA-01110: 数据文件 1:
'E:\ORACLE\ORADATA\YTK\DATAFILE\O1_MF_SYSTEM_1TDY2CXS_.DBF'


ORA-01112: 未启动介质恢复

看来数据库已经无法通过正常方式启动了。这时候最好的办法是通过数据库的备份来进行恢复,通过不完全恢复来恢复数据库。

因为没有数据库的备份,那么就只能通过非常规的方式打开了。

由于丢失在线日志,所以只能通过添加隐含参数的方式:

SQL> ALTER SYSTEM SET "_allow_resetlogs_corruption" = TRUE SCOPE = SPFILE;

系统已更改。

SQL> SHUTDOWN IMMEDIATE
ORA-01109: 数据库未打开


已经卸载数据库。
ORACLE 例程已经关闭。
SQL> STARTUP MOUNT
ORACLE 例程已经启动。

Total System Global Area  251658240 bytes
Fixed Size                  1290012 bytes
Variable Size             171966692 bytes
Database Buffers           71303168 bytes
Redo Buffers                7098368 bytes
数据库装载完毕。
SQL> RECOVER DATABASE UNTIL CANCEL
ORA-00279: 更改 5706539056 (在 12/11/2007 15:49:26 生成) 对于线程 1 是必需的
ORA-00289: 建议: E:\ORACLE\ORADATA\YTK\ARCHIVELOG\ARC01333_0577472831.001
ORA-00280: 更改 5706539056 (用于线程 1) 在序列 #1333 中


指定日志: {=suggested | filename | AUTO | CANCEL}
CANCEL
ORA-01547: 警告: RECOVER 成功但 OPEN RESETLOGS 将出现如下错误
ORA-01194: 文件 1 需要更多的恢复来保持一致性
ORA-01110: 数据文件 1:
'E:\ORACLE\ORADATA\YTK\DATAFILE\O1_MF_SYSTEM_1TDY2CXS_.DBF'


ORA-01112: 未启动介质恢复


SQL> ALTER DATABASE OPEN RESETLOGS;
ALTER DATABASE OPEN RESETLOGS
*
第 1 行出现错误:
ORA-01092: ORACLE 实例终止。强制断开连接

检查alert文件:


Thu Aug 14 17:28:28 2014
Media Recovery Start
WARNING! Recovering data file 461 from a fuzzy backup. It might be an online
backup taken without entering the begin backup command.
WARNING! Recovering data file 462 from a fuzzy backup. It might be an online
backup taken without entering the begin backup command.
 parallel recovery started with 11 processes
Thu Aug 14 17:28:56 2014
ORA-279 signalled during: ALTER DATABASE RECOVER  database until cancel  ...
Thu Aug 14 17:29:00 2014
ALTER DATABASE RECOVER    CANCEL  
Thu Aug 14 17:29:08 2014
ORA-1547 signalled during: ALTER DATABASE RECOVER    CANCEL  ...
Thu Aug 14 17:29:08 2014
ALTER DATABASE RECOVER CANCEL 
ORA-1112 signalled during: ALTER DATABASE RECOVER CANCEL ...
Thu Aug 14 17:29:55 2014
alter database open resetlogs
Thu Aug 14 17:29:57 2014
RESETLOGS is being done without consistancy checks. This may result
in a corrupted database. The database should be recreated.
RESETLOGS after incomplete recovery UNTIL CHANGE 13633909877
Resetting resetlogs activation ID 3385729878 (0xc9ce2356)
db_recovery_file_dest_size of 2048 MB is 8.14% used. This is a
user-specified limit on the amount of space that will be used by this
database for recovery-related files, and does not reflect the amount of
space available in the underlying filesystem or ASM diskgroup.
Thu Aug 14 17:30:16 2014
Setting recovery target incarnation to 10
Thu Aug 14 17:30:21 2014
Assigning activation ID 3403666349 (0xcadfd3ad)
Thread 1 opened at log sequence 1
  Current log# 2 seq# 1 mem# 0: E:\ORACLE\ORADATA\PCWEB\PCWEB\ONLINELOG\O1_MF_2_92FBSFWS_.LOG
  Current log# 2 seq# 1 mem# 1: E:\ORACLE\FLASH_RECOVERY_AREA\PCWEB\ONLINELOG\O1_MF_2_92FBSG2G_.LOG
Successful open of redo thread 1
Thu Aug 14 17:30:22 2014
MTTR advisory is disabled because FAST_START_MTTR_TARGET is not set
Thu Aug 14 17:30:22 2014
SMON: enabling cache recovery
Thu Aug 14 17:30:22 2014
Errors in file e:\oracle\admin\pcweb\udump\pcweb_ora_4292.trc:
ORA-00600: 内部错误代码, 参数: [2662], [3], [749007997], [3], [749148431], [2432696345], [], []


Thu Aug 14 17:30:26 2014
Errors in file e:\oracle\admin\pcweb\udump\pcweb_ora_4292.trc:
ORA-00600: 内部错误代码, 参数: [2662], [3], [749007997], [3], [749148431], [2432696345], [], []


Thu Aug 14 17:30:26 2014
Error 600 happened during db open, shutting down database
USER: terminating instance due to error 600
Thu Aug 14 17:30:26 2014
Errors in file e:\oracle\admin\pcweb\bdump\pcweb_p010_2164.trc:
ORA-00600: 内部错误代码, 参数: [15784], [600], [], [], [], [], [], []
ORA-00600: 内部错误代码, 参数: [], [], [], [], [], [], [], []


Thu Aug 14 17:30:27 2014
Errors in file e:\oracle\admin\pcweb\bdump\pcweb_dbw0_3220.trc:
ORA-00600: ??????, ??: [], [], [], [], [], [], [], []


Thu Aug 14 17:30:27 2014
Errors in file e:\oracle\admin\pcweb\bdump\pcweb_p004_2312.trc:
ORA-00600: 内部错误代码, 参数: [15784], [600], [], [], [], [], [], []
ORA-00600: 内部错误代码, 参数: [], [], [], [], [], [], [], []


Thu Aug 14 17:30:27 2014
Errors in file e:\oracle\admin\pcweb\bdump\pcweb_p000_4068.trc:
ORA-00600: 内部错误代码, 参数: [15784], [600], [], [], [], [], [], []
ORA-00600: 内部错误代码, 参数: [], [], [], [], [], [], [], []


Thu Aug 14 17:30:27 2014
Errors in file e:\oracle\admin\pcweb\bdump\pcweb_p005_2200.trc:
ORA-00600: 内部错误代码, 参数: [15784], [600], [], [], [], [], [], []
ORA-00600: 内部错误代码, 参数: [], [], [], [], [], [], [], []


Thu Aug 14 17:30:27 2014
Errors in file e:\oracle\admin\pcweb\bdump\pcweb_p006_1600.trc:
ORA-00600: 内部错误代码, 参数: [15784], [600], [], [], [], [], [], []
ORA-00600: 内部错误代码, 参数: [], [], [], [], [], [], [], []


Thu Aug 14 17:30:27 2014
Errors in file e:\oracle\admin\pcweb\bdump\pcweb_p001_5144.trc:
ORA-00600: 内部错误代码, 参数: [15784], [600], [], [], [], [], [], []
ORA-00600: 内部错误代码, 参数: [], [], [], [], [], [], [], []


Thu Aug 14 17:30:27 2014
Errors in file e:\oracle\admin\pcweb\bdump\pcweb_p009_5512.trc:
ORA-00600: 内部错误代码, 参数: [15784], [600], [], [], [], [], [], []
ORA-00600: 内部错误代码, 参数: [], [], [], [], [], [], [], []


Thu Aug 14 17:30:27 2014
Errors in file e:\oracle\admin\pcweb\bdump\pcweb_p002_5764.trc:
ORA-00600: 内部错误代码, 参数: [15784], [600], [], [], [], [], [], []
ORA-00600: 内部错误代码, 参数: [], [], [], [], [], [], [], []


Thu Aug 14 17:30:27 2014
Errors in file e:\oracle\admin\pcweb\bdump\pcweb_p008_2004.trc:
ORA-00600: 内部错误代码, 参数: [15784], [600], [], [], [], [], [], []
ORA-00600: 内部错误代码, 参数: [], [], [], [], [], [], [], []


Thu Aug 14 17:30:28 2014
Errors in file e:\oracle\admin\pcweb\bdump\pcweb_psp0_5904.trc:
ORA-00600: ??????, ??: [], [], [], [], [], [], [], []


Thu Aug 14 17:30:28 2014
Errors in file e:\oracle\admin\pcweb\bdump\pcweb_dbw1_4652.trc:
ORA-00600: ??????, ??: [], [], [], [], [], [], [], []


Thu Aug 14 17:30:28 2014
Errors in file e:\oracle\admin\pcweb\bdump\pcweb_mman_5792.trc:
ORA-00600: ??????, ??: [], [], [], [], [], [], [], []


Thu Aug 14 17:30:28 2014
Errors in file e:\oracle\admin\pcweb\bdump\pcweb_pmon_4136.trc:
ORA-00600: ??????, ??: [], [], [], [], [], [], [], []


Thu Aug 14 17:30:28 2014
Errors in file e:\oracle\admin\pcweb\bdump\pcweb_lgwr_5216.trc:
ORA-00600: ??????, ??: [], [], [], [], [], [], [], []


Thu Aug 14 17:30:28 2014
Errors in file e:\oracle\admin\pcweb\bdump\pcweb_p003_5140.trc:
ORA-00600: 内部错误代码, 参数: [15784], [600], [], [], [], [], [], []
ORA-00600: 内部错误代码, 参数: [], [], [], [], [], [], [], []


Thu Aug 14 17:30:28 2014
Errors in file e:\oracle\admin\pcweb\bdump\pcweb_p007_4228.trc:
ORA-00600: 内部错误代码, 参数: [15784], [600], [], [], [], [], [], []
ORA-00600: 内部错误代码, 参数: [], [], [], [], [], [], [], []


Thu Aug 14 17:30:29 2014
Errors in file e:\oracle\admin\pcweb\bdump\pcweb_ckpt_6056.trc:
ORA-00600: ??????, ??: [], [], [], [], [], [], [], []


Thu Aug 14 17:30:33 2014
Errors in file e:\oracle\admin\pcweb\bdump\pcweb_reco_3636.trc:
ORA-00600: ??????, ??: [], [], [], [], [], [], [], []


Thu Aug 14 17:30:34 2014
Errors in file e:\oracle\admin\pcweb\bdump\pcweb_smon_5788.trc:
ORA-00600: ??????, ??: [], [], [], [], [], [], [], []


Thu Aug 14 17:30:38 2014
Instance terminated by USER, pid = 4292
ORA-1092 signalled during: alter database open resetlogs...
Thu Aug 14 17:35:38 2014
USER: terminating instance due to error 1092
Instance terminated by USER, pid = 4292

现在出现了前文提到的ORA-600[2662]错误。

查询metalink,Oracle给出了两种解决方法,如果600的2662错误中第三个参数和第五个参数差别很小,那么就可以通过多次打开关闭数据库实例的方式来增加SCN的值。

不过这种方式每次启动只SCN只增加1,重启三次系统:

Thu Aug 14 17:30:22 2014
Errors in file e:\oracle\admin\pcweb\udump\pcweb_ora_4292.trc:
ORA-00600: 内部错误代码, 参数: [2662], [3], [749007800], [3], [749148431], [2432696345], [], []

而目前的SCN和期望的SCN还相差140000多,显然通过重启的方法不现实。

Oracle给出的第二种方式是通过设置EVENTS来提高Oracle的CURRENT SCN,这个方法的前提就是设置_allow_resetlogs_corruption隐含参数为true:

SQL> CONN /@YTK AS SYSDBA
已连接到空闲例程。
SQL> STARTUP MOUNT
ORACLE 例程已经启动。

Total System Global Area  251658240 bytes
Fixed Size                  1290012 bytes
Variable Size             209715428 bytes
Database Buffers           33554432 bytes
Redo Buffers                7098368 bytes
数据库装载完毕。
SQL> ALTER SESSION SET EVENTS '10015 TRACE NAME ADJUST_SCN LEVEL 1';

(LEVLE 的数值,不管是取1,5,10,20,增量也就2W多)

Fri Aug 15 09:54:31 2014   -------1
Errors in file e:\oracle\admin\pcweb\udump\pcweb_ora_4376.trc:
ORA-00603: ORACLE server session terminated by fatal error
ORA-00600: internal error code, arguments: [2662], [3], [749028012], [3], [749148431], [2432696345], [], []


Fri Aug 15 10:05:55 2014  -----5
Errors in file e:\oracle\admin\pcweb\udump\pcweb_ora_5364.trc:
ORA-00603: ORACLE server session terminated by fatal error
ORA-00600: internal error code, arguments: [2662], [3], [749048022], [3], [749148431], [2432696345], [], []


Fri Aug 15 10:10:59 2014  -----20
Errors in file e:\oracle\admin\pcweb\udump\pcweb_ora_4336.trc:
ORA-00603: ORACLE server session terminated by fatal error
ORA-00600: internal error code, arguments: [2662], [3], [749068032], [3], [749148431], [2432696345], [], []


Fri Aug 15 10:14:20 2014 ------1
Errors in file e:\oracle\admin\pcweb\udump\pcweb_ora_5264.trc:
ORA-00603: ORACLE server session terminated by fatal error
ORA-00600: internal error code, arguments: [2662], [3], [749088042], [3], [749148431], [2432696345], [], []


Fri Aug 15 10:17:51 2014 ------1
Errors in file e:\oracle\admin\pcweb\udump\pcweb_ora_5164.trc:
ORA-00603: ORACLE server session terminated by fatal error
ORA-00600: internal error code, arguments: [2662], [3], [749108052], [3], [749148431], [2432696345], [], []


Fri Aug 15 10:20:05 2014 ------1
Errors in file e:\oracle\admin\pcweb\udump\pcweb_ora_1548.trc:
ORA-00603: ORACLE server session terminated by fatal error
ORA-00600: internal error code, arguments: [2662], [3], [749128062], [3], [749148431], [2432696345], [], []


Fri Aug 15 10:21:55 2014 ------1
Errors in file e:\oracle\admin\pcweb\udump\pcweb_ora_3656.trc:
ORA-00603: ORACLE server session terminated by fatal error
ORA-00600: internal error code, arguments: [2662], [3], [749148072], [3], [749148431], [2432696345], [], []


SQL> ALTER SESSION SET EVENTS '10015 TRACE NAME ADJUST_SCN LEVEL 1';

会话已更改。

多次递增SCN值后

SQL> ALTER DATABASE OPEN;
ERROR:
ORA-03113: 通信通道的文件结束

错误和刚才已经有区别了,看来有打开的希望,检查alert文件发现:

Fri Aug 15 10:23:10 2014
Adjusting the default value of parameter parallel_max_servers
from 240 to 135 due to the value of parameter processes (150)
Fri Aug 15 10:23:10 2014
Starting ORACLE instance (normal)
LICENSE_MAX_SESSION = 0
LICENSE_SESSIONS_WARNING = 0
Picked latch-free SCN scheme 3
Using LOG_ARCHIVE_DEST_10 parameter default value as USE_DB_RECOVERY_FILE_DEST
Autotune of undo retention is turned on. 
IMODE=BR
ILAT =18
LICENSE_MAX_USERS = 0
SYS auditing is disabled
ksdpec: called for event 13740 prior to event group initialization
Starting up ORACLE RDBMS Version: 10.2.0.1.0.
System parameters with non-default values:
  processes                = 150
  __shared_pool_size       = 301989888
  __large_pool_size        = 16777216
  __java_pool_size         = 16777216
  __streams_pool_size      = 0
  nls_language             = SIMPLIFIED CHINESE
  nls_territory            = CHINA
  sga_target               = 2550136832
  control_files            = E:\ORACLE\ORADATA\PCWEB\PCWEB\CONTROLFILE\O1_MF_92FBSD4W_.CTL, E:\ORACLE\FLASH_RECOVERY_AREA\PCWEB\CONTROLFILE\O1_MF_92FBSD5V_.CTL
  db_block_size            = 8192
  __db_cache_size          = 2197815296
  compatible               = 10.2.0.1.0
  db_files                 = 1000
  db_file_multiblock_read_count= 32
  db_create_file_dest      = E:\oracle\oradata\pcweb
  db_recovery_file_dest    = E:\oracle/flash_recovery_area
  db_recovery_file_dest_size= 2147483648
  _allow_resetlogs_corruption= TRUE
  undo_management          = AUTO
  undo_tablespace          = UNDOTBS1
  remote_login_passwordfile= EXCLUSIVE
  db_domain                = 
  dispatchers              = (PROTOCOL=TCP) (SERVICE=pcwebXDB)
  job_queue_processes      = 10
  audit_file_dest          = E:\ORACLE\ADMIN\PCWEB\ADUMP
  background_dump_dest     = E:\ORACLE\ADMIN\PCWEB\BDUMP
  user_dump_dest           = E:\ORACLE\ADMIN\PCWEB\UDUMP
  core_dump_dest           = E:\ORACLE\ADMIN\PCWEB\CDUMP
  db_name                  = pcweb
  open_cursors             = 300
  star_transformation_enabled= TRUE
  pga_aggregate_target     = 847249408
PMON started with pid=2, OS id=4912
PSP0 started with pid=3, OS id=5560
MMAN started with pid=4, OS id=5024
DBW0 started with pid=5, OS id=2036
DBW1 started with pid=6, OS id=2004
LGWR started with pid=7, OS id=5920
CKPT started with pid=8, OS id=1600
SMON started with pid=9, OS id=3096
RECO started with pid=10, OS id=380
CJQ0 started with pid=11, OS id=3560
MMON started with pid=12, OS id=2276
Fri Aug 15 10:23:11 2014
starting up 1 dispatcher(s) for network address '(ADDRESS=(PARTIAL=YES)(PROTOCOL=TCP))'...
MMNL started with pid=13, OS id=4844
Fri Aug 15 10:23:11 2014
starting up 1 shared server(s) ...
Fri Aug 15 10:23:11 2014
ALTER DATABASE   MOUNT
Fri Aug 15 10:23:15 2014
Setting recovery target incarnation to 11
Fri Aug 15 10:23:15 2014
Successful mount of redo thread 1, with mount id 3403722127
Fri Aug 15 10:23:15 2014
Database mounted in Exclusive Mode
Completed: ALTER DATABASE   MOUNT
Fri Aug 15 10:23:21 2014
alter database open
Fri Aug 15 10:23:24 2014
Beginning crash recovery of 1 threads
 parallel recovery started with 11 processes
Fri Aug 15 10:23:26 2014
Started redo scan
Fri Aug 15 10:23:26 2014
Completed redo scan
 5 redo blocks read, 4 data blocks need recovery
Fri Aug 15 10:23:26 2014
Started redo application at
 Thread 1: logseq 8, block 3, scn 13634049951
Fri Aug 15 10:23:27 2014
Recovery of Online Redo Log: Thread 1 Group 1 Seq 8 Reading mem 0
  Mem# 0 errs 0: E:\ORACLE\ORADATA\PCWEB\PCWEB\ONLINELOG\O1_MF_1_92FBSFD6_.LOG
  Mem# 1 errs 0: E:\ORACLE\FLASH_RECOVERY_AREA\PCWEB\ONLINELOG\O1_MF_1_92FBSFK2_.LOG
Fri Aug 15 10:23:27 2014
Completed redo application
Fri Aug 15 10:23:27 2014
Completed crash recovery at
 Thread 1: logseq 8, block 8, scn 13634069957
 4 data blocks read, 4 data blocks written, 5 redo blocks read
Fri Aug 15 10:23:36 2014
Thread 1 advanced to log sequence 9
Thread 1 opened at log sequence 9
  Current log# 3 seq# 9 mem# 0: E:\ORACLE\ORADATA\PCWEB\PCWEB\ONLINELOG\O1_MF_3_92FBSG98_.LOG
  Current log# 3 seq# 9 mem# 1: E:\ORACLE\FLASH_RECOVERY_AREA\PCWEB\ONLINELOG\O1_MF_3_92FBSGH4_.LOG
Successful open of redo thread 1
Fri Aug 15 10:23:37 2014
MTTR advisory is disabled because FAST_START_MTTR_TARGET is not set
Fri Aug 15 10:23:37 2014
SMON: enabling cache recovery
Fri Aug 15 10:23:37 2014
Successfully onlined Undo Tablespace 1.
Dictionary check beginning
Fri Aug 15 10:24:07 2014
Dictionary check complete
Fri Aug 15 10:24:07 2014
SMON: enabling tx recovery
Fri Aug 15 10:24:09 2014
Database Characterset is ZHS16GBK
Fri Aug 15 10:24:15 2014
Errors in file e:\oracle\admin\pcweb\bdump\pcweb_smon_3096.trc:
ORA-00600: ??????, ??: [4137], [], [], [], [], [], [], []


Fri Aug 15 10:24:18 2014
ORACLE Instance pcweb (pid = 9) - Error 600 encountered while recovering transaction (16, 25).
Fri Aug 15 10:24:18 2014
Errors in file e:\oracle\admin\pcweb\bdump\pcweb_smon_3096.trc:
ORA-00600: ??????, ??: [4137], [], [], [], [], [], [], []


Fri Aug 15 10:24:20 2014
Errors in file e:\oracle\admin\pcweb\bdump\pcweb_smon_3096.trc:
ORA-00600: ??????, ??: [4137], [], [], [], [], [], [], []


ORACLE Instance pcweb (pid = 9) - Error 600 encountered while recovering transaction (24, 25).
Fri Aug 15 10:24:22 2014
Errors in file e:\oracle\admin\pcweb\bdump\pcweb_smon_3096.trc:
ORA-00600: ??????, ??: [4137], [], [], [], [], [], [], []


Fri Aug 15 10:24:24 2014
Errors in file e:\oracle\admin\pcweb\bdump\pcweb_smon_3096.trc:
ORA-00600: ??????, ??: [4137], [], [], [], [], [], [], []


ORACLE Instance pcweb (pid = 9) - Error 600 encountered while recovering transaction (25, 20).
Fri Aug 15 10:24:26 2014
Errors in file e:\oracle\admin\pcweb\bdump\pcweb_smon_3096.trc:
ORA-00600: ??????, ??: [4137], [], [], [], [], [], [], []


Fri Aug 15 10:24:43 2014
Errors in file e:\oracle\admin\pcweb\udump\pcweb_ora_2268.trc:
ORA-00600: 内部错误代码, 参数: [4194], [60], [26], [], [], [], [], []


Fri Aug 15 10:24:44 2014
DEBUG: Replaying xcb 0xc78900d0, pmd 0xc79154b0 for failed op 8
Doing block recovery for file 580 block 133507
No block recovery was needed
Fri Aug 15 10:25:09 2014
Errors in file e:\oracle\admin\pcweb\udump\pcweb_ora_2268.trc:
ORA-00600: 内部错误代码, 参数: [4194], [60], [26], [], [], [], [], []
ORA-00600: 内部错误代码, 参数: [4194], [60], [26], [], [], [], [], []


Fri Aug 15 10:25:10 2014
DEBUG: Replaying xcb 0xc78900d0, pmd 0xc79154b0 for failed op 8
Doing block recovery for file 580 block 133507
No block recovery was needed
Fri Aug 15 10:25:10 2014
Errors in file e:\oracle\admin\pcweb\udump\pcweb_ora_2268.trc:
ORA-00600: 内部错误代码, 参数: [4194], [60], [26], [], [], [], [], []
ORA-00600: 内部错误代码, 参数: [4194], [60], [26], [], [], [], [], []


Fri Aug 15 10:25:12 2014
Errors in file e:\oracle\admin\pcweb\udump\pcweb_ora_2268.trc:
ORA-00603: ORACLE server session terminated by fatal error
ORA-00600: internal error code, arguments: [4194], [60], [26], [], [], [], [], []
ORA-00600: internal error code, arguments: [4194], [60], [26], [], [], [], [], []


Fri Aug 15 10:25:37 2014
Errors in file e:\oracle\admin\pcweb\bdump\pcweb_smon_3096.trc:
ORA-00600: 内部错误代码, 参数: [4194], [60], [26], [], [], [], [], []


Fri Aug 15 10:25:38 2014
Fatal internal error happened while SMON was doing active transaction recovery.
Fri Aug 15 10:25:38 2014
Errors in file e:\oracle\admin\pcweb\bdump\pcweb_smon_3096.trc:
ORA-00600: 内部错误代码, 参数: [4194], [60], [26], [], [], [], [], []


SMON: terminating instance due to error 474
Fri Aug 15 10:25:39 2014
Errors in file e:\oracle\admin\pcweb\bdump\pcweb_pmon_4912.trc:
ORA-00474: SMON 进程因错误而终止


Fri Aug 15 10:25:39 2014
Errors in file e:\oracle\admin\pcweb\bdump\pcweb_ckpt_1600.trc:
ORA-00474: SMON 进程因错误而终止


Fri Aug 15 10:25:40 2014
Errors in file e:\oracle\admin\pcweb\bdump\pcweb_reco_380.trc:
ORA-00474: SMON 进程因错误而终止


Fri Aug 15 10:25:40 2014
Errors in file e:\oracle\admin\pcweb\bdump\pcweb_lgwr_5920.trc:
ORA-00474: SMON 进程因错误而终止


Fri Aug 15 10:25:43 2014
Errors in file e:\oracle\admin\pcweb\bdump\pcweb_dbw1_2004.trc:
ORA-00474: SMON 进程因错误而终止


Fri Aug 15 10:25:43 2014
Errors in file e:\oracle\admin\pcweb\bdump\pcweb_dbw0_2036.trc:
ORA-00474: SMON 进程因错误而终止


Fri Aug 15 10:25:43 2014
Errors in file e:\oracle\admin\pcweb\bdump\pcweb_mman_5024.trc:
ORA-00474: SMON 进程因错误而终止


Fri Aug 15 10:25:44 2014
Errors in file e:\oracle\admin\pcweb\bdump\pcweb_psp0_5560.trc:
ORA-00474: SMON 进程因错误而终止


Instance terminated by SMON, pid = 3096

接下来是因为一致性被破坏而出现的ORA-600 4194数据库内部错误,这与UNDO回滚有关。

最后数据库因为4914错误实例崩溃。通过内部参数强制打开数据库,就破坏了数据库的一致性,不可避免地会遇到一系列的内部错误。
ORA-600 [4194]错误的官方解释是:“Undo Record Number Mismatch While Adding Undo Record”,当数据库通过REDO恢复来增加UNDO记录时,发现UNDO记录的号码不匹配,也就是出现了不一致。
这可以通过重建UNDO表空间来解决。设置如下初始化参数。


(1)用spfile创建pfile,然后修改参数
#*.undo_tablespace='UNDOTBS1' 
#*.undo_management='AUTO' 

*.undo_management='MANUAL'
*.rollback_segments='SYSTEM' 

(2)用修改后的pfile,启动DB
 SQL> STARTUP   pfile='E:\oracle\db\dbs\pfile20140814.ora'   


ORACLE 例程已经启动。

Total System Global Area  251658240 bytes
Fixed Size                  1290012 bytes
Variable Size             222298340 bytes
Database Buffers           20971520 bytes
Redo Buffers                7098368 bytes
数据库装载完毕。


(3)删除原来的UNDO表空间进行重建

SQL> drop tablespace undotbs1 including contents and datafiles;

SQL> create undo tablespace undotbs1 datafile 'E:\oracle\oradata\pcweb\UNDOTBS1_20G_01.DBF' size 20g autoextend off;


(4)关闭数据库,修改pfile参数,然后用新的pfile创建spfile,在正常启动数据库

*.undo_tablespace='UNDOTBS1' 

*.undo_management='AUTO' 

#*.undo_management='MANUAL' 

#*.rollback_segments='SYSTEM'


SQL> RECOVER DATABASE UNTIL CANCEL
完成介质恢复。
SQL> ALTER DATABASE OPEN RESETLOGS;

数据库已更改。

数据库终于打开。下面要做的就是去掉隐含参数,再次重启,验证是否可以启动。

SQL> ALTER SYSTEM RESET "_allow_resetlogs_corruption" SCOPE = SPFILE SID = '*';

系统已更改。

SQL> SHUTDOWN IMMEDIATE
数据库已经关闭。
已经卸载数据库。
ORACLE 例程已经关闭。
SQL> STARTUP
ORACLE 例程已经启动。

Total System Global Area  251658240 bytes
Fixed Size                  1290012 bytes
Variable Size             218104036 bytes
Database Buffers           25165824 bytes
Redo Buffers                7098368 bytes
数据库装载完毕。
数据库已经打开。

数据库已经正常打开,但是由于使用_allow_resetlogs_corruption方式打开,会造成数据的丢失,且数据库的状态不一致。因此,这种情况下Oracle建议通过EXP方式导出数据库。重建新数据库后,再导入。

你可能感兴趣的:(oracle)