接下来drop刚刚建立的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> select EXTENT_MANAGEMENT from dba_tablespaces where tablespace_name='RBS01';
EXTENT_MAN
----------
DICTIONARY |
这回表空间不是LMT的,是DMT的,呵呵!
下面才是真正开始要做的工作,总之两个字,细心,因为是生产库,不敢马虎。
SQL> set feedback off
SQL> set pages 0
SQL> select '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; |
然后做个drop回滚段的脚本:
SQL>? select 'drop rollback segment '||segment_name||';' from dba_rollback_segs;
drop rollback segment RBS0;
drop rollback segment RBS1;
drop rollback segment RBS2;
drop rollback segment RBS3;
drop rollback segment RBS4;
drop rollback segment RBS5;
drop rollback segment RBS6;
drop rollback segment RBS7;
drop rollback segment RBS8;
drop rollback segment RBS9;
drop rollback segment RBS10;
drop rollback segment RBS11;
drop rollback segment RBS12;
drop rollback segment RBS13;
drop rollback segment RBS14;
drop rollback segment RBS15;
drop rollback segment RBS16;
drop rollback segment RBS17;
drop rollback segment RBS18;
drop rollback segment RBS19;
drop rollback segment RBS20;
drop rollback segment RBS21;
drop rollback segment RBS22;
drop rollback segment RBS23;
drop rollback segment RBS24;
drop rollback segment RBS25;
drop rollback segment RBS26;
drop rollback segment RBS27;
drop rollback segment RBS28;
drop rollback segment APPRBS; |
脚本做好了,别忘了执行。
查看本文来源