Monday, July 22, 2013

ORA-39726: unsupported add/drop column operation on compressed tables

Cause : In this error occurred because the table your trying to drop columns from are compressed. Table compression is usually applied to partitioned tables, to minimized spaced based on columns with repeating values


SQL> ALTER TABLE OUTWDMST COMPRESS;

Table altered.

SQL> ALTER TABLE OUTWDMST DROP COLUMN CCU_CODE;
ALTER TABLE OUTWDMST DROP COLUMN CCU_CODE
                                 *
ERROR at line 1:
ORA-39726: unsupported add/drop column operation on compressed tables


SQL> ALTER TABLE OUTWDMST SET UNUSED COLUMN CCU_CODE;

Table altered.

SQL> ALTER TABLE OUTWDMST DROP UNUSED COLUMNS;

Table altered.

SQL> SELECT CCU_CODE FROM OUTWDMST;
SELECT CCU_CODE FROM OUTWDMST
       *
ERROR at line 1:
ORA-00904: "CCU_CODE": invalid identifier


SQL>

No comments:

Post a Comment