Oracle8i回滚段表空间出现坏块的解决(1)
文章作者 100test 发表时间 2007:03:14 13:58:08
来源 100Test.Com百考试题网
今天早上刚到公司便接到网通客户的投诉电话,说网管数据库出问题了,数据库有坏块,回滚段里的部分数据不能读取,需要帮忙解决。
我查看了一下swappALRT.log文件,发现有以下错误:
Tue Sep 21 10:34:08 2004
Errors in file E:\oracle\admin wapp\bdump wappSMON.TRC:
ORA-01578: ORACLE data block corrupted (file # 2, block # 24497)
ORA-01110: data file 2: E:\ORACLE\ORADATA WAPP\RBS01.DBF |
原来是回滚段表空间数据文件有坏块了。知道了问题的所在,立刻解决,我已经想好了思路,就是新建一个回滚段表空间,把以前坏了的回滚段表空间0drop掉,在新的回滚段表空间上建回滚段,所要建的回滚段和以前的一摸一样,让以后产生的回滚数据都写到新建的回滚段上。思路清晰,立刻开始行动了。
?首先停到listener,不允许有新的应用连到数据库上做操作,然后down掉数据库,为了清除掉已有的数据库会话连接资源:
$lsnrctl stop
LSNRCTL for Solaris: Version 8.1.7.3.0 - Production on 21-SEP-2004 17:40:36
(c) Copyright 1998 Oracle Corporation.? All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=ipasdb)
(PORT=1521)))
The command completed successfully.
$sqlplus internal/oracle
SQL*Plus: Release 8.1.7.0.0 - Production on Tue Sep 21 17:41:24 2004
(c) Copyright 2000 Oracle Corporation.? All rights reserved.
Connected to:
Oracle8i Enterprise Edition Release 8.1.7.3.0 - 64bit Production
With the Partitioning option
JServer Release 8.1.7.3.0 - 64bit Production
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL>startup restrict (以受限模式启动数据库,为了防止其他用户登陆进来做相关操作,这时候只允许管理员登陆) |
查找回滚段对应的表空间:
SQL> 0select tablespace_name,status from dba_tablespaces.
TABLESPACE_NAME??????????????? STATUS
------------------------------ ---------
SYSTEM???????????????????????? ONLINE
TOOLS????????????????????????? ONLINE
RBS??????????????????????????? ONLINE
TEMP?????????????????????????? ONLINE
USERS????????????????????????? ONLINE
INDX?????????????????????????? ONLINE
DRSYS????????????????????????? ONLINE
WACOS????????????????????????? ONLINE
NMS??????????????????????????? ONLINE
TEST?????????????????????????? ONLINE
FS???????????????????????????? ONLINE
PERFSTAT?????????????????????? ONLINE
12rows 0selected. |
回滚段表空间为RBS.