日期:2014-05-16 浏览次数:20455 次
alter table TABLENAME move tablespace TABLESPACENAME;
alter index INDEXNAME rebuild tablespace TABLESPACENAME;
alter table TABLENAME move tablespace TABLESPACENAME lob(COLUMNNAME) store as(tablespace TABLESPACENAME);
select 'alter table '||a.table_name||' move tablespace workflow;', a.owner,a.table_name,a.tablespace_name,a.* from dba_tables a where a.Owner='ERMIS_SHANXI' order by a.owner,a.table_name;
select 'alter index '||a.index_name||' rebuild tablespace workflow;', a.owner,a.index_name,a.tablespace_name,a.* from dba_indexes a where a.Owner='ERMIS_SHANXI' order by a.owner,a.table_name;
ALTER TABLE WF_H_PROCESSINSTATTR MOVE TABLESPACE WORKFLOW LOB (ATTRIBUTE) STORE AS(TABLESPACE WORKFLOW);
select 'alter index '||a.index_name||' rebuild tablespace VASD;', a.owner,a.index_name,a.tablespace_name,a.* from dba_indexes a where a.Owner='CMS200BJ2' and index_type='NORMAL' order by a.owner,a.table_name; select 'alter index '||a.index_name||' rebuild tablespace VASD;', a.owner,a.index_name,a.tablespace_name,a.* from dba_indexes a where a.Owner='CMS200BJ2' and index_type='LOB' order by a.owner,a.table_name;
SELECT DISTINCT a.table_name FROM dba_indexes a WHERE a.owner = 'CMS200BJ2' AND index_type = 'LOB'