![oracle断电重启之ORA-00600[4194] oracle断电重启之ORA-00600[4194]](https://image.shishitao.com:8440/aHR0cHM6Ly9ia3FzaW1nLmlrYWZhbi5jb20vdXBsb2FkL2NoYXRncHQtcy5wbmc%2FIQ%3D%3D.png?!?w=700&webp=1)
1.问题描述
Oracle服务器断电重启以后无法数据库无法正常连接,使用sqlplus envision/envision连接报错。常见的错误有以下这些:
- ORA-12518: TNS:listener could not hand off client connection
- ORA-12560: TNS:protocol adapter error
- ORA-01034: ORACLE not available
- ORA-27101: shared memory realm does not exist
- ORA-12514: TNS:listener does not currently know of service requested in connect descriptor
- ORA-00600:[4194]
2.基本处理
上述这些ORA报错,基本可以归类为一下几种:
- 环境变量ORACLE_SID是否为prjdb,如果不是就设置环境变量
- TNSListener服务是否启动,如果没有启动就重新启动一下。
- prjdb这个oracle服务是否启动,如果没有启动就启动一下
- 使用dba身份能否连接oralce。
3.查看日志确认问题
将上面的这些问题都过一遍,并且都操作一遍以后发现问题还是没有解决,此时我们可以查看oracle 的alert log。我的alert log的路径为:
D:\app\oracle\diag\rdbms\prjdb\prjdb\trace\alert_prjdb.txt
打开alert log文件,找到日志的最后一行,发现行号是1003417,如下图所示:
接着尝试重启oracle服务,
重启完毕以后再次查看log文件,看看日志有什么错误。当我们找到ora-00600[4194]的时候,就定位到undo表空间文件损坏这个问题。最后解决方法就是重建undo表空间。
4.问题处理步骤:重建undo表空间
4.1思路:
在INITprjdb.ora这个配置文件中将undo表空间指向系统表空间system,然后删除undo表空间,最后在创建undo表空间,最后再在INITprjdb.ora这个配置文件中将undo表空间指向刚刚创建的undo表空间。
4.2查看表空间
select * from v$tablespace;
4.3查看undo表空间
show parameter undo
4.4管理员身份登陆:
sqlplus / as sysdba
4.5创建pfile
create pfile from spfile;
关闭实例
shutdown immediate
修改INITprjdb.ora参数
undo_management= MANUAL
undo_tablespace= SYSTEM
这个可以参考:http://www.xifenfei.com/2111.html
启动数据库
在修改INITprjdb.ora以后,以INITprjdb.ora这个参数文件中的配置启动oracle实例
$SQL> startup pfile=D:\app\oracle\product\11.2.0\dbhome_1\database\INITprjdb.ora ORACLE instance started.
Total System Global Area 857903104 bytes
Fixed Size 1377952 bytes
Variable Size 503318880 bytes
Database Buffers 348127232 bytes
Redo Buffers 5079040 bytes
Database mounted.
Database opened.
删除undo表空间
因为重新指定了undo表空间,所以我们可以将undotbs1这个表空间删除
SQL> drop tablespace undotbs1 including CONTENTS;
重建表空间
CREATE SMALLFILE UNDO TABLESPACE UNDOTBS1 DATAFILE 'D:\app\oracle\oradata\prjdb\UNDOTBS01.DBF' SIZE 200M REUSE AUTOEXTEND ON NEXT 10M MAXSIZE 8G;
重新创建pfile
create pfile from spfile;
重启oracle数据库
PS:ORA-00600[4193]
Starting up:
Oracle Database 11g Enterprise Edition Release 11.2.0.1. - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options.
Using parameter settings in server-side spfile D:\ORACLE\PRODUCT\11.2.\DBHOME_1\DATABASE\SPFILEPRJDB.ORA
System parameters with non-default values:
processes =
nls_language = "SIMPLIFIED CHINESE"
nls_territory = "CHINA"
memory_target = 1232M
control_files = "D:\ORACLE\ORADATA\PRJDB\CONTROL01.CTL"
control_files = "D:\ORACLE\FLASH_RECOVERY_AREA\PRJDB\CONTROL02.CTL"
db_block_size =
compatible = "11.2.0.0.0"
db_recovery_file_dest = "d:\oracle\flash_recovery_area"
db_recovery_file_dest_size= 3852M
undo_tablespace = "UNDOTBS1"
remote_login_passwordfile= "EXCLUSIVE"
db_domain = ""
dispatchers = "(PROTOCOL=TCP) (SERVICE=prjdbXDB)"
audit_file_dest = "D:\ORACLE\ADMIN\PRJDB\ADUMP"
audit_trail = "DB"
db_name = "prjdb"
open_cursors =
deferred_segment_creation= FALSE
diagnostic_dest = "D:\ORACLE"
Wed Jun ::
PMON started with pid=, OS id=
Wed Jun ::
VKTM started with pid=, OS id= at elevated priority
VKTM running at ()millisec precision with DBRM quantum ()ms
Wed Jun ::
GEN0 started with pid=, OS id=
Wed Jun ::
DIAG started with pid=, OS id=
Wed Jun ::
DBRM started with pid=, OS id=
Wed Jun ::
PSP0 started with pid=, OS id=
Wed Jun ::
DIA0 started with pid=, OS id=
Wed Jun ::
MMAN started with pid=, OS id=
Wed Jun ::
DBW0 started with pid=, OS id=
Wed Jun ::
LGWR started with pid=, OS id=
Wed Jun ::
CKPT started with pid=, OS id=
Wed Jun ::
SMON started with pid=, OS id=
Wed Jun ::
RECO started with pid=, OS id=
Wed Jun ::
MMON started with pid=, OS id=
starting up dispatcher(s) for network address '(ADDRESS=(PARTIAL=YES)(PROTOCOL=TCP))'...
Wed Jun ::
MMNL started with pid=, OS id=
starting up shared server(s) ...
ORACLE_BASE from environment = d:\oracle
Wed Jun ::
alter database mount exclusive
Successful mount of redo thread , with mount id
Database mounted in Exclusive Mode
Lost write protection disabled
Completed: alter database mount exclusive
alter database open
Beginning crash recovery of threads
parallel recovery started with processes
Started redo scan
Completed redo scan
read KB redo, data blocks need recovery
Started redo application at
Thread : logseq , block
Recovery of Online Redo Log: Thread Group Seq Reading mem
Mem# : D:\ORACLE\ORADATA\PRJDB\REDO02.LOG
Completed redo application of .02MB
Completed crash recovery at
Thread : logseq , block , scn
data blocks read, data blocks written, redo k-bytes read
Wed Jun ::
Thread advanced to log sequence (thread open)
Thread opened at log sequence
Current log# seq# mem# : D:\ORACLE\ORADATA\PRJDB\REDO03.LOG
Successful open of redo thread
Wed Jun ::
MTTR advisory is disabled because FAST_START_MTTR_TARGET is not set
Wed Jun ::
SMON: enabling cache recovery
Successfully onlined Undo Tablespace .
Verifying file header compatibility for 11g tablespace encryption..
Verifying 11g file header compatibility for tablespace encryption completed
SMON: enabling tx recovery
Database Characterset is US7ASCII
Errors in file d:\oracle\diag\rdbms\prjdb\prjdb\trace\prjdb_smon_1324.trc (incident=):
ORA-: ??????, ??: [], [], [
Incident details in: d:\oracle\diag\rdbms\prjdb\prjdb\incident\incdir_69779\prjdb_smon_1324_i69779.trc
No Resource Manager plan active
replication_dependency_tracking turned off (no async multimaster replication found)
Wed Jun ::
Trace dumping is performing id=[cdmp_20140611104319]
Doing block recovery for file block
Resuming block recovery (PMON) for file block
Block recovery from logseq , block to scn
Recovery of Online Redo Log: Thread Group Seq Reading mem
Mem# : D:\ORACLE\ORADATA\PRJDB\REDO03.LOG
Block recovery stopped at EOT rba 4146.73.
Block recovery completed at rba 4146.73., scn 0.176123515
Doing block recovery for file block
Resuming block recovery (PMON) for file block
Block recovery from logseq , block to scn
Recovery of Online Redo Log: Thread Group Seq Reading mem
Mem# : D:\ORACLE\ORADATA\PRJDB\REDO03.LOG
Block recovery completed at rba 4146.69., scn 0.176123509
Errors in file d:\oracle\diag\rdbms\prjdb\prjdb\trace\prjdb_smon_1324.trc:
ORA-: ??? () ??? () ???
ORA-: ??????, ??: [], [], [
Starting background process QMNC
Wed Jun ::
QMNC started with pid=, OS id=
Wed Jun ::
Errors in file d:\oracle\diag\rdbms\prjdb\prjdb\trace\prjdb_mmon_3672.trc (incident=):
ORA-: ??????, ??: [], [], [
Incident details in: d:\oracle\diag\rdbms\prjdb\prjdb\incident\incdir_69795\prjdb_mmon_3672_i69795.trc
Completed: alter database open
Trace dumping is performing id=[cdmp_20140611104326]
Doing block recovery for file block
Resuming block recovery (PMON) for file block
Block recovery from logseq , block to scn
Recovery of Online Redo Log: Thread Group Seq Reading mem
Mem# : D:\ORACLE\ORADATA\PRJDB\REDO03.LOG
Block recovery stopped at EOT rba 4146.77.
Block recovery completed at rba 4146.77., scn 0.176123527
Doing block recovery for file block
Resuming block recovery (PMON) for file block
Block recovery from logseq , block to scn
Recovery of Online Redo Log: Thread Group Seq Reading mem
Mem# : D:\ORACLE\ORADATA\PRJDB\REDO03.LOG
Block recovery completed at rba 4146.73., scn 0.176123521
Errors in file d:\oracle\diag\rdbms\prjdb\prjdb\trace\prjdb_mmon_3672.trc (incident=):
ORA-: ??????, ??: [], [: ??
Incident details in: d:\oracle\diag\rdbms\prjdb\prjdb\incident\incdir_69796\prjdb_mmon_3672_i69796.trc
Doing block recovery for file block
Resuming block recovery (PMON) for file block
Block recovery from logseq , block to scn
Recovery of Online Redo Log: Thread Group Seq Reading mem
Mem# : D:\ORACLE\ORADATA\PRJDB\REDO03.LOG
Block recovery completed at rba 4146.77., scn 0.176123530
Errors in file d:\oracle\diag\rdbms\prjdb\prjdb\trace\prjdb_mmon_3672.trc (incident=):
ORA-: ??????, ??: [], [], [
Incident details in: d:\oracle\diag\rdbms\prjdb\prjdb\incident\incdir_69797\prjdb_mmon_3672_i69797.trc
Wed Jun ::
Trace dumping is performing id=[cdmp_20140611104333]
Wed Jun ::
Doing block recovery for file block
Resuming block recovery (PMON) for file block
Block recovery from logseq , block to scn
Recovery of Online Redo Log: Thread Group Seq Reading mem
Mem# : D:\ORACLE\ORADATA\PRJDB\REDO03.LOG
Block recovery completed at rba 4146.77., scn 0.176123530
Errors in file d:\oracle\diag\rdbms\prjdb\prjdb\trace\prjdb_mmon_3672.trc (incident=):
ORA-: ??????, ??: [], [], [
Incident details in: d:\oracle\diag\rdbms\prjdb\prjdb\incident\incdir_69798\prjdb_mmon_3672_i69798.trc
Trace dumping is performing id=[cdmp_20140611104335]
Doing block recovery for file block
Resuming block recovery (PMON) for file block
Block recovery from logseq , block to scn
Recovery of Online Redo Log: Thread Group Seq Reading mem
Mem# : D:\ORACLE\ORADATA\PRJDB\REDO03.LOG
Trace dumping is performing id=[cdmp_20140611104337]
Block recovery completed at rba 4146.77., scn 0.176123530
Errors in file d:\oracle\diag\rdbms\prjdb\prjdb\trace\prjdb_mmon_3672.trc (incident=):
ORA-: ??????, ??: [], [], [
Incident details in: d:\oracle\diag\rdbms\prjdb\prjdb\incident\incdir_69799\prjdb_mmon_3672_i69799.trc
Doing block recovery for file block
Resuming block recovery (PMON) for file block
Block recovery from logseq , block to scn
Recovery of Online Redo Log: Thread Group Seq Reading mem
Mem# : D:\ORACLE\ORADATA\PRJDB\REDO03.LOG
Block recovery completed at rba 4146.77., scn 0.176123530
Errors in file d:\oracle\diag\rdbms\prjdb\prjdb\trace\prjdb_mmon_3672.trc (incident=):
ORA-: ??????, ??: [], [], [
Trace dumping is performing id=[cdmp_20140611104339]
Doing block recovery for file block
Resuming block recovery (PMON) for file block
Block recovery from logseq , block to scn
Recovery of Online Redo Log: Thread Group Seq Reading mem
Mem# : D:\ORACLE\ORADATA\PRJDB\REDO03.LOG
Block recovery completed at rba 4146.77., scn 0.176123530
Errors in file d:\oracle\diag\rdbms\prjdb\prjdb\trace\prjdb_mmon_3672.trc (incident=):
ORA-: ??????, ??: [], [], [
Doing block recovery for file block
Resuming block recovery (PMON) for file block
Block recovery from logseq , block to scn
Recovery of Online Redo Log: Thread Group Seq Reading mem
Mem# : D:\ORACLE\ORADATA\PRJDB\REDO03.LOG
Block recovery completed at rba 4146.77., scn 0.176123530
Errors in file d:\oracle\diag\rdbms\prjdb\prjdb\trace\prjdb_mmon_3672.trc (incident=):
ORA-: ??????, ??: [], [], [
Doing block recovery for file block
Resuming block recovery (PMON) for file block
Block recovery from logseq , block to scn
Recovery of Online Redo Log: Thread Group Seq Reading mem
Mem# : D:\ORACLE\ORADATA\PRJDB\REDO03.LOG
Block recovery completed at rba 4146.77., scn 0.176123530
Errors in file d:\oracle\diag\rdbms\prjdb\prjdb\trace\prjdb_mmon_3672.trc (incident=):
ORA-: ??????, ??: [], [], [
Doing block recovery for file block
Resuming block recovery (PMON) for file block
Block recovery from logseq , block to scn
Recovery of Online Redo Log: Thread Group Seq Reading mem
Mem# : D:\ORACLE\ORADATA\PRJDB\REDO03.LOG
Block recovery completed at rba 4146.77., scn 0.176123530
Errors in file d:\oracle\diag\rdbms\prjdb\prjdb\trace\prjdb_mmon_3672.trc (incident=):
ORA-: ??????, ??: [], [], [
Doing block recovery for file block
Resuming block recovery (PMON) for file block
Block recovery from logseq , block to scn
Recovery of Online Redo Log: Thread Group Seq Reading mem
Mem# : D:\ORACLE\ORADATA\PRJDB\REDO03.LOG
Block recovery completed at rba 4146.77., scn 0.176123530
Errors in file d:\oracle\diag\rdbms\prjdb\prjdb\trace\prjdb_mmon_3672.trc (incident=):
ORA-: ??????, ??: [], [], [
Doing block recovery for file block
Resuming block recovery (PMON) for file block
Block recovery from logseq , block to scn
Recovery of Online Redo Log: Thread Group Seq Reading mem
Mem# : D:\ORACLE\ORADATA\PRJDB\REDO03.LOG
Block recovery completed at rba 4146.77., scn 0.176123530
Errors in file d:\oracle\diag\rdbms\prjdb\prjdb\trace\prjdb_mmon_3672.trc (incident=):
ORA-: ??????, ??: [], [], [
Wed Jun ::
Doing block recovery for file block
Resuming block recovery (PMON) for file block
Block recovery from logseq , block to scn
Recovery of Online Redo Log: Thread Group Seq Reading mem
Mem# : D:\ORACLE\ORADATA\PRJDB\REDO03.LOG
Block recovery completed at rba 4146.77., scn 0.176123530
Errors in file d:\oracle\diag\rdbms\prjdb\prjdb\trace\prjdb_pmon_3868.trc (incident=):
ORA-: ??????, ??: [], [], [
Errors in file d:\oracle\diag\rdbms\prjdb\prjdb\trace\prjdb_pmon_3868.trc:
ORA-: ??????, ??: [], [], [
PMON (ospid: ): terminating the instance due to error
从这里可以看到出现了ORA-600[4194]/[4193],第一感觉就是undo出现问题。
4193:表示undo和redo不一致(Arg [a] Undo record seq number,Arg [b] Redo record seq number );
4194:表示也是undo和redo不一致(Arg [a] Maximum Undo record number in Undo block,Arg [b] Undo record number from Redo block)
所以出现4193错误,解决方法跟4194一样。