断电重启后的ora-00603和ora-00600错误

本文详细介绍了如何解决Oracle数据库服务器在重新开机后无法正常启动的问题,包括通过警报日志定位错误,理解undo块修复与redo、undo序列号不一致导致的前滚失败原因,以及通过删除并重建undo表空间的方法来解决数据库故障。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

 接到现场电话,机房断电,数据库服务器重新开机后oracle 无法正常启动。 经查看,发现startup时,报以下错误:
ORA-00603:ORACLE服务器会话因致命错误而终止

查看alert日志, 看到有很多的 undo 块需要修复且需要应用到 redo,并且有大量的
Doing block recovery for file 3 block 16185
No block recovery was needed

No block recovery was needed这句话,说明没有恢复成功,这就导致前滚失败,redoUndoseq#(序列号)不一致,就会报ORA-4194等的错误
解决方法——删除undo表空间并重建,重建方法如下:http://blog.youkuaiyun.com/elvis_dataguru/article/details/8082834

(1)创建pfile文件   --为了设置一个隐藏参数

SQL> startup nomount;

ORACLE instance started.

Total System Global Area  598437888 bytes

Fixed Size                  1338140 bytes

Variable Size             394265828 bytes

Database Buffers          197132288 bytes

Redo Buffers                5701632 bytes

SQL> create pfile='/u01/corrupt.ora' from spfile;

File created.

SQL> shutdown immediate

ORA-01507: database not mounted

ORACLE instance shut down.

(2)修改corrupt.ora文件&&修改undo_management=manual

*._allow_resetlogs_corruption=TRUE

*.audit_file_dest='/u01/oracle/admin/elvis/adump'

*.audit_trail='db'

*.compatible='11.2.0.0.0'

*.control_files='/u01/oracle/oradata/elvis/control01.ctl','/u01/oracle/flash_recovery_area/elvis/control02.ctl'

*.db_block_size=8192

*.db_domain=''

*.db_name='elvis'

*.db_recovery_file_dest='/u01/oracle/flash_recovery_area'

*.db_recovery_file_dest_size=5218762752

*.diagnostic_dest='/u01/oracle'

*.dispatchers='(PROTOCOL=TCP) (SERVICE=elvisXDB)'

*.memory_target=598736896

*.open_cursors=300

*.processes=150

*.remote_login_passwordfile='EXCLUSIVE'

*.undo_tablespace='UNDOTBS1'

*.undo_management='MANUAL'

~

SQL> startup mount pfile='/u01/corrupt.ora'

ORACLE instance started.

Total System Global Area  598437888 bytes

Fixed Size                  1338140 bytes

Variable Size             394265828 bytes

Database Buffers          197132288 bytes

Redo Buffers                5701632 bytes

Database mounted.

SQL> show parameter undo

NAME                                 TYPE        VALUE

------------------------------------ ----------- ------------------------------

undo_management                     string      MANUAL

undo_retention                       integer     900

undo_tablespace                      string      UNDOTBS1

这个需要改为manual

SQL> alter database open;

Database altered.

创建新的undo表空间

SQL> create undo tablespace undotbs02 datafile '/u01/oracle/oradata/elvis/undotbs02.dbf' size 500m;

Tablespace created.

删除旧的undo表空间

SQL> select tablespace_name from dba_tablespaces;

TABLESPACE_NAME

------------------------------

SYSTEM

SYSAUX

UNDOTBS1

TEMP

USERS

TEST

UNDOTBS02

7 rows selected.

SQL> drop tablespace undotbs1 including contents and datafiles;

Tablespace dropped.

看下物理文件

[oracle@elvis elvis]$ ll

total 2080736

drwxr-xr-x 2 oracle oinstall      4096 Oct 13 19:49 bak

-rw-r----- 1 oracle oinstall  10076160 Oct 17 18:49 control01.ctl

-rw-r----- 1 oracle oinstall  52429312 Oct 17 18:37 redo01.log

-rw-r----- 1 oracle oinstall  52429312 Oct 17 18:37 redo02.log

-rw-r----- 1 oracle oinstall  52429312 Oct 17 18:49 redo03.log

-rw-r----- 1 oracle oinstall 629153792 Oct 17 18:48 sysaux01.dbf

-rw-r----- 1 oracle oinstall 734011392 Oct 17 18:48 system01.dbf

-rw-r----- 1 oracle oinstall  71311360 Oct  8 08:50 temp01.dbf

-rw-r----- 1 oracle oinstall  52436992 Oct 17 18:37 test01.dbf

-rw-r----- 1 oracle oinstall 524296192 Oct 17 18:45 undotbs02.dbf

-rw-r----- 1 oracle oinstall   5251072 Oct 17 18:37 users01.dbf

可以看到undotbs1的表空间文件也相应的删除了

(3)使用spfile参数文件打开数据库

SQL> shutdown immediate

Database closed.

Database dismounted.

ORACLE instance shut down.

SQL> startup nomount

ORACLE instance started.

Total System Global Area  598437888 bytes

Fixed Size                  1338140 bytes

Variable Size             394265828 bytes

Database Buffers          197132288 bytes

Redo Buffers                5701632 bytes

SQL> show parameter undo

NAME                                 TYPE        VALUE

------------------------------------ ----------- ------------------------------

undo_management                      string      AUTO

undo_retention                       integer     900

undo_tablespace                      string      UNDOTBS1

SQL> alter system set undo_tablespace=undotbs02 scope=spfile;

System altered.

SQL> shutdown immediate;

ORA-01507: database not mounted

ORACLE instance shut down.

SQL> startup

ORACLE instance started.

Total System Global Area  598437888 bytes

Fixed Size                  1338140 bytes

Variable Size             394265828 bytes

Database Buffers          197132288 bytes

Redo Buffers                5701632 bytes

Database mounted.

Database opened.

可以看到数据库正常开启。

关于ORA-600[41XX]这种错误基本都属于Undo的错误。

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/30158432/viewspace-1815543/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/30158432/viewspace-1815543/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值