日期:2014-05-16 浏览次数:20512 次
alter table CHANNEL_GROUP enable row movement; alter table CHANNEL_GROUP shrink space;
[1].临时表方式.
select tablespace_name from tabs where table_name='ABIS_ASSIGNMENT_COMMAND';--TABSPA_YF_ABIS
create table ABIS_ASSIGNMENT_COMMAND_COPY tablespace TABSPA_YF_ABIS nologging as select * from ABIS_ASSIGNMENT_COMMAND;
alter table ABIS_ASSIGNMENT_COMMAND_COPY rename to ABIS_ASSIGNMENT_COMMAND;
drop table E ABIS_ASSIGNMENT_COMMAND_COPY;
commit;
[2].如果要删除掉一个非分区表的大部分数据,又要降低这个表的高水位线,可以这么做.
select table_name,tablespace_name from user_tables where table_name=upper('internal_cell1');--TABSPA_CDD
create table internal_cell1_copy tablespace TABSPA_CDD nologging as select * from internal_cell1 where ttime!='2014-01-13';
commit;
drop table internal_cell1;
alter table internal_cell1_copy rename to internal_cell1;
commit;
[3].如果只要一个表的表结构,不复制数据,可以这么做。
create table site_info_copy tablespace TABSPA_CDD nologging as select * from site_info where 1=2;
exp 'scott/fsyd' file='E:\serveral_tablels.dmp' tables=(cy_cell_list,site_info,CELTCHF,region_list) imp 'scott/fsyd' file='F:\从249导过来的数据\serveral_tablels.dmp' tables=(cy_cell_list,site_info,CELTCHF,region_list)
execute immediate 'truncate table cy_xinzhan_guihua_advice'; execute immediate 'alter table cy_xinzhan_guihua_advice deallocate UNUSED KEEP 0';