- 论坛徽章:
- 3
|
http://blog.chinaunix.net/u/7121/showart_2203039.html
2、确定损坏的回滚段
error freeing extent (75) of rollback segment (3))
根据该日志可以判断是第三个回滚段的第75个区损坏
Doing block recovery for file 2 block 58981
SELECT segment_name,segment_type,extent_id,block_id, blocks
from dba_extents t
where file_id = 2
AND 58981 between block_id and (block_id + blocks - 1) ;
SEGMENT_NAME
--------------------------------------------------------------------------------
SEGMENT_TYPE EXTENT_ID BLOCK_ID BLOCKS
------------------ ---------- ---------- ----------
_SYSSMU3$
TYPE2 UNDO 74 58761 1024
(在此有个疑问,数据库不能open,如何执行这个查询的?)
根据那个错误日志基本可以判断是在读取file 2的58981数据块时出错的,可以执行上面sql确定损坏的回滚段
3、修改pfile如下
*.undo_management='MANUAL'
*._corrupted_rollback_segments=(_SYSSMU3$)
4、启动数据库,并重新创建undo表空间
$ !sql
sqlplus "/as sysdba"
SQL*Plus: Release 10.2.0.4.0 - Production on Fri Mar 26 13:46:28 2010
Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
Connected to an idle instance.
SQL> startup pfile='/tmp/a.txt';
---------这个pfile我是这样得到的:startup mount;
---------create pfile='$ORACLE_BASE/my.ora' from spfile;
---------执行步骤:3、修改pfile如下
---------startup pfile='$ORACLE_BASE/my.ora'
ORACLE instance started.
Total System Global Area 314572800 bytes
Fixed Size 1267212 bytes
Variable Size 188746228 bytes
Database Buffers 117440512 bytes
Redo Buffers 7118848 bytes
Database mounted.
Database opened.
SQL> create undo tablespace undotbs2 datafile '/data/oradata/rcms/undotbs02.dbf' size 2g;
Tablespace created.
SQL> drop tablespace undotbs1;
Tablespace dropped.
SQL> alter tablespace undotbs2 rename to undotbs1;
Tablespace altered.
SQL>
至此基本搞定
linux 下可以通过这个确定system中正在使用的undo段
strings /oracle/dev/oradata/CRMDEV/system01.dbf | grep _SYSSMU | cut -d $ -f 1 |sort -u |
|