如果我们按普通分区表移动,移动后,会发现大对象还在以前表空间,对于大对象分区表,需要这样移动:
alter table gaodc.T_GNLK_ZSXX move PARTITION PART_RZSJ_001 tablespace BKJ_GAODC_KK_DATA1 lob (XP) store as (tablespace BKJ_GAODC_KK_DATA1);
有多个分区,使用脚本生成移动表空间语句:
SELECT 'alter table gaodc.'
|| table_name
|| ' move PARTITION '
|| partition_name
|| ' tablespace BKJ_GAODC_KK_DATA1 lob (' || COLUMN_NAME || ') store as (tablespace BKJ_GAODC_KK_DATA1);'
FROM dba_lob_partitions
WHERE tablespace_name = 'BKJ_GAODC_KK_DATA';
------------------------------------------------
alter table gaodc.T_GNLK_ZSXX move PARTITION PART_RZSJ_001 tablespace BKJ_GAODC_KK_DATA1 lob (XP) store as (tablespace BKJ_GAODC_KK_DATA1);
alter table gaodc.T_GNLK_ZSXX move PARTITION PART_RZSJ_002 tablespace BKJ_GAODC_KK_DATA1 lob (XP) store as (tablespace BKJ_GAODC_KK_DATA1);
alter table gaodc.T_GNLK_ZSXX move PARTITION PART_RZSJ_003 tablespace BKJ_GAODC_KK_DATA1 lob (XP) store as (tablespace BKJ_GAODC_KK_DATA1);
alter table gaodc.T_GNLK_ZSXX move PARTITION PART_RZSJ_004 tablespace BKJ_GAODC_KK_DATA1 lob (XP) store as (tablespace BKJ_GAODC_KK_DATA1);
alter table gaodc.T_GNLK_ZSXX move PARTITION PART_RZSJ_005 tablespace BKJ_GAODC_KK_DATA1 lob (XP) store as (tablespace BKJ_GAODC_KK_DATA1);
alter table gaodc.T_GNLK_ZSXX move PARTITION PART_RZSJ_006 tablespace BKJ_GAODC_KK_DATA1 lob (XP) store as (tablespace BKJ_GAODC_KK_DATA1);
alter table gaodc.T_GNLK_ZSXX move PARTITION PART_RZSJ_007 tablespace BKJ_GAODC_KK_DATA1 lob (XP) store as (tablespace BKJ_GAODC_KK_DATA1);
alter table gaodc.T_GNLK_ZSXX move PARTITION PART_RZSJ_008 tablespace BKJ_GAODC_KK_DATA1 lob (XP) store as (tablespace BKJ_GAODC_KK_DATA1);
alter table gaodc.T_GNLK_ZSXX move PARTITION PART_RZSJ_009 tablespace BKJ_GAODC_KK_DATA1 lob (XP) store as (tablespace BKJ_GAODC_KK_DATA1);
alter table gaodc.T_GNLK_ZSXX move PARTITION PART_RZSJ_011 tablespace BKJ_GAODC_KK_DATA1 lob (XP) store as (tablespace BKJ_GAODC_KK_DATA1);
alter table gaodc.T_GNLK_ZSXX move PARTITION PART_RZSJ_012 tablespace BKJ_GAODC_KK_DATA1 lob (XP) store as (tablespace BKJ_GAODC_KK_DATA1);