一次oracle数据库数据块损坏的处理过程(三)

2014-11-24 16:55:58 · 作者: · 浏览: 14
ments:[2662], [2139], [791626371], [2139], [791626610], [12583120], [], [], [], [],[], [] ORA-01092: ORACLE instance terminated.Disconnection forced ORA-00600: internal error code, arguments:[2662], [2139], [791626368], [2139], [791626610], [12583120], [], [], [], [],[], []

7.重启启动数据库数据库已能正常启动,但启动后很快就down掉,

SQL> startup mount;

ORACLE instance started.

Total System Global Area 6714322944 bytes
Fixed Size                  2226056 bytes
Variable Size            5033166968 bytes
Database Buffers         1660944384 bytes
RedoBuffers               17985536 bytes
Database mounted.

SQL> alter database open;

Database altered.

SQL> select * from v$instance; 

select * from v$instance

*

ERROR at line 1:

ORA-03135: connection lost contact

Process ID: 10171

Session ID: 1705 Serial number: 5

1.2 启动后down,报错ORA-600 [4194]

8,查看日志,日志报错,ORA-01595,ora-600 [4194]

Block recovery completed at rba 2.137.16,scn 2139.791646684

Errors in file/app/oracle/diag/rdbms/epm/epm1/trace/epm1_smon_10046.trc:

ORA-01595: error freeing extent (49) ofrollback segment (6))

ORA-00600: internal error code, arguments:[4194], [], [], [], [], [], [], [], [], [], [], []

9,继续查询metalink,关于ora-600[4194],文章ID 1428786.1有详细讲解,原因是由于断电或者硬件故障,数据库实例恢复rollback时报错,

Symptoms

The following error is occurring in thealert.log right before the database crashes.

ORA-00600: internal error code, arguments:[4194], [#], [#], [], [], [], [], []

This error indicates that a mismatch hasbeen detected between redo records and rollback (undo) records.

ARGUMENTS:

Arg [a] - Maximum Undo record number inUndo block

Arg [b] - Undo record number from Redoblock

 Since we are adding a new undo record toour undo block, we would expect that the new record number is equal to themaximum record number in the undo block plus one. Before Oracle can add a newundo record to the undo block it validates that this is correct. If thisvalidation fails, then an ORA-600 [4194] will be triggered.

Changes

This issue generally occurs when there is apower outage or hardware failure that initially crashes the database. Onstartup, the database does the normal roll forward (redo) and then rollback(undo), this is where the error is generated on the rollback.

10,metalink的解决方案是重建undo表空间,基本思路是先把undo设置为manual管理方式,重建undo,然后重启库即可

SQL> Create pfile='/tmp/corrupt.ora'from spfile ;

vi /tmp/corrupt.ora

*.Undo_management=Manual

启动数据库到mount状态

SQL> Startup mountpfile='/tmp/corrupt.ora'

ORACLE instance started.

Total System Global Area 6714322944 bytes

Fixed Size                  2226056 bytes

Variable Size            5033166968 bytes

Database Buffers         1660944384 bytes

Redo Buffers               17985536 bytes

Database mounted.

SQL> Show parameter undo

NAME                                 TYPE        VALUE

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

undo_management                      string      MANUAL

undo_retention                       integer     10800

undo_tablespace                      string      UNDOTBS1

SQL> Alter database open ;

Database altered.

SQL> Create rollback segment r01 ;


Rollback segment created.

SQL> Alter rollback segment r01 online ;

 Rollback segment altered.

SQL> Create undo tablespace undotbs_2datafile '/app/oracle/oradata/epm/undotbs_2.dbf' size 200M ;

Tablespace created.

 SQL> alter system set undo_tablespace ='undotbs_2' scope=spfile;

 System altered.
 

再次重启数据库,此时也能正确启动

SQL> startup