Search code examples
oracle-databaseoracle12c

Dropping table identity causes ORA-00600 error on Oracle 12c


My Oracle DB version is 12.1.0.2.0.

I'm having a hard time removing the column identity. Also tried to drop the column and dropping the table with purge command, but every time I'm getting the same Oracle error:

ORA-00600: internal error code, arguments: [12811], [96650], [], [], [], [], [], [], [], [], [], []

Just can't touch the identity column. I tried below commands but no luck:

ALTER TABLE DYS_CATEGORY MODIFY CATEGORY_ID DROP IDENTITY;

ALTER TABLE DYS_CATEGORY DROP COLUMN CATEGORY_ID;

DROP TABLE DYS_CATEGORY PURGE;

I can drop any other column from the table, but the problem is with identity column.

Identity columns are new to Oracle, just introduced in 12c.


Solution

  • This is a problem with Oracle 12.1.0.2.0. At least one other person has reported it (on Windows, which may be relevant).

    The error you have is an ORA-00600, which is Oracle's default message for unhandled exceptions i.e. Oracle bugs. The correct answer is to raise a Service Request with Oracle Support; they will be able to provide you with a patch or a workaround if you have a corrupted table you need to fix. If you don't have a Support contract you may be out of luck.

    For future reference dropping identity columns is a two-stage process:

    alter table t42 modify id drop identity;
    
    alter table t42 drop column id;
    

    As it happens, this is not a problem on the very latest version of the product. In Oracle 18c we can just drop the column without modifying it first. LiveSQL demo.