Oracle8i回滚段表空间出现坏块的解决(2)
文章作者 100test 发表时间 2007:03:14 13:58:14
来源 100Test.Com百考试题网
接下来0drop刚刚建立的rbs01表空间,重新建立rbs01表空间:
SQL> create tablespace rbs01 datafile /opt/oracle/db02/oradata/ORCL/rbs01.dbf
size 1024M
?autoextend on next 1M maxsize unlimited.
Tablespace created.
SQL> 0select EXTENT_MANAGEMENT from dba_tablespaces where tablespace_name= RBS01 .
EXTENT_MAN
----------
DICTIONARY |
这回表空间不是LMT的,是DMT的,呵呵!
下面才是真正开始要做的工作,总之两个字,细心,因为是生产库,不敢马虎。
SQL> set feedback off
SQL> set pages 0
SQL> 0select alter rollback segment ||segment_name|| offline. ? from dba_rollback_segs. |
做一个脚本把除system回滚段以外的回滚段都offline掉,省的一个一个敲,脚本结果如下:
alter rollback segment RBS0 offline.
alter rollback segment RBS1 offline.
alter rollback segment RBS2 offline.
alter rollback segment RBS3 offline.
alter rollback segment RBS4 offline.
alter rollback segment RBS5 offline.
alter rollback segment RBS6 offline.
alter rollback segment RBS7 offline.
alter rollback segment RBS8 offline.
alter rollback segment RBS9 offline.
alter rollback segment RBS10 offline.
alter rollback segment RBS11 offline.
alter rollback segment RBS12 offline.
alter rollback segment RBS13 offline.
alter rollback segment RBS14 offline.
alter rollback segment RBS15 offline.
alter rollback segment RBS16 offline.
alter rollback segment RBS17 offline.
alter rollback segment RBS18 offline.
alter rollback segment RBS19 offline.
alter rollback segment RBS20 offline.
alter rollback segment RBS21 offline.
alter rollback segment RBS22 offline.
alter rollback segment RBS23 offline.
alter rollback segment RBS24 offline.
alter rollback segment RBS25 offline.
alter rollback segment RBS26 offline.
alter rollback segment RBS27 offline.
alter rollback segment RBS28 offline.
alter rollback segment APPRBS offline. |
然后做个0drop回滚段的脚本:
SQL>? 0select 0drop rollback segment ||segment_name|| . from dba_rollback_segs.
0drop rollback segment RBS0.
0drop rollback segment RBS1.
0drop rollback segment RBS2.
0drop rollback segment RBS3.
0drop rollback segment RBS4.
0drop rollback segment RBS5.
0drop rollback segment RBS6.
0drop rollback segment RBS7.
0drop rollback segment RBS8.
0drop rollback segment RBS9.
0drop rollback segment RBS10.
0drop rollback segment RBS11.
0drop rollback segment RBS12.
0drop rollback segment RBS13.
0drop rollback segment RBS14.
0drop rollback segment RBS15.
0drop rollback segment RBS16.
0drop rollback segment RBS17.
0drop rollback segment RBS18.
0drop rollback segment RBS19.
0drop rollback segment RBS20.
0drop rollback segment RBS21.
0drop rollback segment RBS22.
0drop rollback segment RBS23.
0drop rollback segment RBS24.
0drop rollback segment RBS25.
0drop rollback segment RBS26.
0drop rollback segment RBS27.
0drop rollback segment RBS28.
0drop rollback segment APPRBS. |
脚本做好了,别忘了执行。
执行完后开始在新的回滚段表空间下建回滚段,存储参数和原来保持一致:
SQL> 0select? create public rollback segment ||segment_name||
tablespace rbs01 storage(initial 524288 next 524288 MINEXTENTS
8 MAXEXTENTS 4096 OPTIMAL 4194304). from dba_rollback_segs. |
也是做了个脚本,免的一个一个敲!
下面的大回滚段要单独建,总之,系统里面最好要有一个大的回滚段,有大事物的时候就派上用场了。
SQL> create public rollback segment APPRBS tablespace rbs01
storage(initial 2097152 next 10485760 MINEXTENTS 50
MAXEXTENTS 32765).
Rollback segment created. |