Oracle partition table move and lob move containing partition table
The table contains lob fields, and the space needs to be recovered. First of all, move table, move table, lob space will not be released after move table, and move for lob field is also needed:
Move of the non-partitioned table lob:
Alter table T_SEND_LOG move lob (MESSAGE) store as (tablespace DATALOB)
Move of the partition table lob:
Alter table T_SEND_LOG move partition p2018 lob (MESSAGE) store as (tablespace DATALOB)
Partition table move:
Alter table T_SEND_LOG move partition p2018
Remember the rebuild index after move table.
Refer to the batch generation statement:
For tablespaces:
Select 'alter table' | | a.owner | |'. | | a.table_name | | 'move lob (' | a.COLUMN_NAME | |') store as (tablespace DATALOB);'
From dba_lobs an APP' DBANGSEGMENTS b where a.owner in
And a.OWNER=b.OWNER and a.SEGMENT_NAME=b.SEGMENT_NAME and b.TABLESPACENAMESTOBY PACSLOB'
For tables:
Select 'alter table' | | a.owner | |'. | | a.table_name | | 'move lob (' | a.COLUMN_NAME | |') store as (tablespace DATALOB);'
From dba_lobs an APP' DBANGSEGMENTS b where a.owner in
And a.OWNER=b.OWNER and a.SEGMENT_NAME=b.SEGMENT_NAME and a.TABLE_NAME = 'Tunable SENDLog'