今天一台user測試數據庫因操作系統無故菪機﹐造成undo表空間損壞﹐其解決過程如下﹕
在alert_dbtest.log中得到如下錯誤信息﹕
Errors in file /oracle/admin/dbtest/udump/dbtest_ora_1828.trc:
ORA-01578: ORACLE data block corrupted (file # 2, block # 105)
ORA-01110: data file 2: '/u1/dbtest/undotbs01.dbf'
Fri Aug 25 15:24:39 2006
Error 1578 happened during db open, shutting down database
因為是undo表空間﹐首先想到的是重建它﹐否則就要用sys.dbms_repair來修復了。
現在的問題是數據庫每次mount之后就無法open﹐所以無法重建undo表空間﹐因此得在初始化參數中加入如下隱含參數(在使用*._corrupted_rollback_segments前最好是先用*._offline_rollback_segments)﹕
*.rollback_segments=(system)
*._corrupted_rollback_segments=(_SYSSMU1$,_SYSSMU2$,_SYSSMU3$,_SYSSMU4$,_SYSSMU5$,_SYSSMU6$,_SYSSMU7$,_SYSSMU8$,_SYSSMU9$,_SYSSMU10$,_SYSSMU11$,_SYSSMU12$,_SYSSMU13$,_SYSSMU14$,_SYSSMU15$,_SYSSMU16$,_SYSSMU17$,_SYSSMU18$,_SYSSMU19$,_SYSSMU20$)
在重新啟動數據庫后﹐馬上重建undo表空間﹕
SQL> create undo tablespace undotbs2 datafile '/u1/dbtest/undotbs2_01.dbf' size 100m;
Tablespace created
SQL>alter system set undo_tablespace=undotbs2;
然后﹐drop tablespace undotbs1 including contents and datafile 。
在去掉*._corrupted_rollback_segments參數試圖重新啟動數據庫時﹐又出現如下錯誤﹕
Fri Aug 25 15:29:19 2006
Errors in file /oracle/admin/dbtest/udump/dbtest_ora_1918.trc:ORA-00600: internal error code, arguments: [25012], [1], [2], [], [], [], [], []
Fri Aug 25 15:29:21 2006
Errors in file /oracle/admin/dbtest/udump/dbtest_ora_1918.trc:ORA-00600: internal error code, arguments: [25012], [1], [2], [], [], [], [], []
Fri Aug 25 15:29:21 2006
Error 600 happened during db open, shutting down database
USER: terminating instance due to error 600
Instance terminated by USER, pid = 1918
ORA-1092 signalled during: ALTER DATABASE OPEN...
從該ora-00600[25012]錯誤的信息來看﹐還是undotbs01表空間的問題﹕
Note: For additional ORA-600 related information please read [NOTE:146580.1]
PURPOSE: This article discusses the internal error "ORA-600 [25012]", what it means and possible actions.
The information here is only applicable to the versions listed and is provided only for guidance.
ERROR: ORA-600 [25012][a][b][c][d][e]
VERSIONS: versions 8.0.X to 9.0.X
DESCRIPTION: We are trying to generate the absolute file number given a tablespace number and relative file number and cannot find a matching file number or the file number is zero.
ARGUMENTS: Arg [a] Tablespace Number Arg [b] Relative file number
這個時候想到的是重建undotbs1表空間(按理來說undotbs1已經正常drop了﹐應該不會有這個問題出﹐搞不懂為什么會這樣?)﹕
SQL> create undo tablespace undotbs1 datafile '/u1/dbtest/undotbs1_01.dbf' size 100m;
去掉隱含參數﹐再重新啟動﹐這次可以正常啟動了。
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/33600/viewspace-266407/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/33600/viewspace-266407/