ERROR

Unique constraint violated

Last Published: April 25, 2020

Error Message

Building a pyramid with the 'sderaster' command yields a unique constraint violation error. For example:

"Updating pyramid...
Error: SE_stream_execute (-51)
Error: Underlying DBMS error
Error: DBMS error code (1)
Error: ORA-00001: unique constraint (VEGDIR.SDE_BLK_3_UK) violated".

Cause

This error is caused by pyramid blocks left behind by a mosaic or a previously failed attempt to build the pyramid.

Solution or Workaround

Option 1: Remove the pyramid blocks left behind by a failed pyramid build. Use the pyramid operation of the 'sderaster' command set to level zero.

Option 2: Use the raster column identifier to determine the number of pyramid blocks that may have been left behind by a mosaic.

  1. Use a SQL utility specific to the relational database management system to query the sde.raster_column table to obtain a raster column identifier.
    Code:
    select rastercolumn_id
    from sde.raster_columns
    where table_name =
    '<business table name>';

  2. Replace the <N> in the sde_blk_<N> with the raster column id of your raster.
    Code:
    select count(*) from sde_blk_<N>
    where rasterband_id < 0;

  3. Delete the pyramid blocks through SQL, if they exist.
    Code:
    delete from sde_blk_<N>
    where rasterband_id < 0

Article ID:000005233

Software:
  • Legacy Products

Receive notifications and find solutions for new or common issues

Get summarized answers and video solutions from our new AI chatbot.

Download the Esri Support App

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options