Get the App
SLTechnology News&Howtos  ›  Database  › 

Oracle partition table move and lob move containing partition table

Shulou Source: shulou.com Published: 2022-06-01 15:10:09 09月30日 Update

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'

Tags: Space partition table field postscript index statement reference generation Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Docker vpn Xiaomi Shulou Tech Info OPPO Reno