标签:count type temp ora build tab rebuild uil format
column SQLTEXT format a80
select count(*) from dba_segments where tablespace_name = ‘USERS‘ and segment_type=‘TABLE‘;
select ‘alter table ‘ || owner || ‘.‘ || segment_name || ‘ move tablespace dbs_temp;‘ sqltext from dba_segments where tablespace_name = ‘USERS‘ and segment_type=‘TABLE‘;
select count(*) from dba_segments where tablespace_name = ‘USERS‘ and segment_type=‘INDEX‘;
select ‘alter index ‘ || owner || ‘.‘ || segment_name || ‘ rebuild tablespace dbs_temp;‘ sqltext from dba_segments where tablespace_name = ‘USERS‘ and segment_type=‘INDEX‘;
select count(*) from from dba_lobs where tablespace_name = ‘USERS‘;
select ‘alter table ‘ || owner || ‘.‘ || table_name || ‘ move lob(‘ || column_name || ‘) store as(tablespace dbs_temp);‘ sqltext from dba_lobs where tablespace_name = ‘USERS‘;
标签:count type temp ora build tab rebuild uil format
原文地址:http://www.cnblogs.com/ilifeilong/p/7538397.html