Enabling lob compression once all partitions are securefile
Virgile, December 20, 2022 - 7:47 am UTC
Once all partitions are securefile, I did not find a way to enable lob compression without doing a DBMS_REDEFINITION.
Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.17.0.0.0
SQL> column TABLE_NAME format A30
SQL> column PARTITION_NAME format A30
SQL> create table t ( x int, y clob )
lob ( y ) store as basicfile
partition by range (x)
interval ( 10 ) ( partition p1 values less than (10) lob ( y ) store as basicfile );
Table created.
SQL> select table_name, securefile
from dba_lobs
where owner = 'EP2'
and table_name in ('T');
TABLE_NAME SEC
------------------------------ ---
T NO
SQL> select table_name, partition_name, securefile
from dba_lob_partitions
where table_owner = 'EP2'
and table_name in ('T');
TABLE_NAME PARTITION_NAME SEC
------------------------------ ------------------------------ ---
T P1 NO
SQL> insert into t values (25, 'clob');
1 row created.
SQL> alter table t drop partition P1;
Table altered.
SQL> select table_name, securefile
from dba_lobs
where owner = 'EP2'
and table_name in ('T');
TABLE_NAME SEC
------------------------------ ---
T NO
SQL> select table_name, partition_name, securefile
from dba_lob_partitions
where table_owner = 'EP2'
and table_name in ('T');
TABLE_NAME PARTITION_NAME SEC
------------------------------ ------------------------------ ---
T SYS_P654041 YES
SQL> ALTER TABLE t MOVE LOB(y) STORE AS securefile;
ALTER TABLE t MOVE LOB(y) STORE AS securefile
*
ERROR at line 1:
ORA-14511: cannot perform operation on a partitioned object
SQL> alter table t modify default attributes lob(y)(compress low);
alter table t modify default attributes lob(y)(compress low)
*
ERROR at line 1:
ORA-43856: Unsupported LOB type for SECUREFILE LOB operation
October 16, 2023 - 1:40 am UTC
SQL> create table t ( x int, c clob )
2 lob ( c ) store as securefile ( compress low )
3 partition by range (x)
4* interval ( 10 ) ( partition p1 values less than (10) );
Table T created.
SQL>
SQL> alter table t modify default attributes lob ( c ) ( compress high );
Table T altered.