ERROR

Failed to compress the database. Cannot insert the value NULL into column 'compress_id', table 'SDE.dbo.SDE_compress_log'; column does not allow nulls

Last Published: April 25, 2020

Error Message

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

"Failed to compress the database. Underlying DBMS error [<name>: Cannot insert the value NULL into column 'compress_id', table 'SDE.dbo.SDE_compress_log'; column does not allow nulls. INSERT fails.][dbo.DEFAULT]"
[O-Image]

Cause

Before registering with the geodatabase, the compress_id column in the sde_compress_log table has its Identity set as 'True', so that newly inserted records have a unique identity value for the compress_id column.

When the sde_compress_log is registered with the geodatabase, the compress_id column is removed and added back in, but the Identity value is changed from 'True' to 'False'. When new records are inserted into the sde_compress_log table, the compress_id column value is null, which conflicts with the "not null" constraint.
[O-Image]

Solution or Workaround

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

    Article ID:000011832

    Software:
    • Legacy Products

    Get help from ArcGIS experts

    Contact technical support

    Download the Esri Support App

    Go to download options

    Discover more on this topic