Skip to main content
Delphix

Oracle Masking Fails with "ORA-02293 cannot validate (DB.SYS_C5987157) - check constraint violated" (KBA8167)

 

 

KBA

KBA# 8167

 

Issue

Oracle masking may fail at the end or towards the end of masking with the following error:

2021-09-17 22:21:32,872 [pool-5-thread-7] INFO  c.d.d.m.t.RunServiceImpl - [JOB_ID_202_707] 2021/09/17 22:21:32 - Execute_Enable_Constraints_Script.0 - Couldn't execute SQL: ALTER TABLE "DB"."TABLE" ENABLE  CONSTRAINT "SYS_C5987157"

2021-09-17 22:21:32,872 [pool-5-thread-7] INFO  c.d.d.m.t.RunServiceImpl - [JOB_ID_202_707] 2021/09/17 22:21:32 - Execute_Enable_Constraints_Script.0 - ORA-02293: cannot validate (DB.SYS_C5987157) - check constraint violated

This occurs when the masking engine is attempting to enable the constraint at the end of the masking job.

Applicable Delphix Versions

Click here to view the versions of the Delphix engine to which this article applies
Major Release All Sub Releases
6.0 6.0.0.0, 6.0.1.0, 6.0.1.1, 6.0.2.0, 6.0.2.1, 6.0.3.0, 6.0.3.1, 6.0.4.0, 6.0.4.1, 6.0.4.2, 6.0.5.0, 6.0.6.0, 6.0.6.1, 6.0.7.0, 6.0.8.0, 6.0.8.1, 6.0.9.0, 6.0.10.0, 6.0.10.1

5.3

5.3.0.0, 5.3.0.1, 5.3.0.2, 5.3.0.3, 5.3.1.0, 5.3.1.1, 5.3.1.2, 5.3.2.0, 5.3.3.0, 5.3.3.1, 5.3.4.0, 5.3.5.0, 5.3.6.0, 5.3.7.0, 5.3.7.1, 5.3.8.0, 5.3.8.1, 5.3.9.0

5.2

5.2.2.0, 5.2.2.1, 5.2.3.0, 5.2.4.0, 5.2.5.0, 5.2.5.1, 5.2.6.0, 5.2.6.1

5.1

5.1.0.0, 5.1.1.0, 5.1.2.0, 5.1.3.0, 5.1.4.0, 5.1.5.0, 5.1.5.1, 5.1.6.0, 5.1.7.0, 5.1.8.0, 5.1.8.1, 5.1.9.0, 5.1.10.0

5.0

5.0.1.0, 5.0.1.1, 5.0.2.0, 5.0.2.1, 5.0.2.2, 5.0.2.3, 5.0.3.0, 5.0.3.1, 5.0.4.0, 5.0.4.1, 5.0.5.0, 5.0.5.1, 5.0.5.2, 5.0.5.3, 5.0.5.4

Resolution

  1. The SQL the masking engine runs will be in the logs. Try manually disabling and enabling on the database.
    In the above example the SQL statement would be:
    ALTER TABLE "DB"."TABLE" ENABLE  CONSTRAINT "SYS_C5987157"
  2. Check what the constraint does and why it failed. Does an algorithm need to be changed?
  3. Try removing and adding the constraint back with Pre and Post scripts added to the masking job.