Oracle收缩表空间
Posted 一泽涟漪
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Oracle收缩表空间相关的知识,希望对你有一定的参考价值。
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‘;
以上是关于Oracle收缩表空间的主要内容,如果未能解决你的问题,请参考以下文章