English

Error: Failed to compress the database. [Error inserting into .COMPRESS_LOG.::ORA-01400: cannot insert NULL into ("SDE"."COMPRESS_LOG"."OBJECTID")]

Error Message

In an Oracle SDE geodatabase, the 'compress_log' table displays in ArcCatalog after a compress is performed in ArcGIS for Desktop 10.1. If this table is already registered with the geodatabase, performing the compress on the geodatabase again produces the following error:

"Failed to compress the database. Underlying DBMS error [Error inserting into <schema>.COMPRESS_LOG.::ORA-01400: cannot insert NULL into ("SDE"."COMPRESS_LOG"."OBJECTID")][SDE.DEFAULT]".
[O-Image]

Cause

When registered with the geodatabase, the column 'OBJECTID' is added into the compress_log table. The OBJECTID column does not allow null values. When new records are inserted into the compress_log table, the value for OBJECTID column is null, which conflicts with the 'not null' constraint.

Fields properties (before registering the compress_log table with the geodatabase)
[O-Image]
A warning is provided for the OBJECTID column when registering the compress_log table with the geodatabase
[O-Image]
Fields properties (after registering the compress_log table with the geodatabase)
[O-Image]

Solution or Workaround

Delete or rename the compress_log table. A new compress_log table is recreated in the next compress.