Database Error Messages

OCI-11534

check constraint (constraint_schema.constraint_name) involving column_names due to domain constraint domain_constraint_schema.domain_constraint_name of domain domain_schema.domain_name violated
  • constraint_schema: The schema name where the constraint resides.
  • constraint_name: The name of the constraint.
  • column_names: The column names involved in the constraint. A subset of the column names if the list is too long.
  • domain_constraint_schema: The schema name where the domain constraint resides.
  • domain_constraint_name: The name of the domain constraint the constraint is inherited from.
  • domain_schema: The schema name where the domain resides.
  • domain_name: The name of the domain.

Cause

The values being inserted did not satisfy the named check constraint inherited from the named domain constraint.


Action

Do not insert values that violate the constraint or disassociate the columns from the named domain.


Additional Information

Further details about the violating colums are provided with the parameter ERROR_MESSAGE_DETAILS=ON. This parameter is ON by default. If it is currently OFF, you can enable this parameter with the statement ALTER SESSION SET ERROR_MESSAGE_DETAILS=ON.

The following example describes how to identify the table name and table columns of the violated constraint:

SELECT column_name, table_name
FROM  all_cons_columns
WHERE owner = '<schema_name>'
AND   constraint_name = '<constraint_name>';

The result of this statement could appear as follows:

ORA-11534: check constraint (SCOTT.SYS_C008516) due to domain constraint
SH.SYS_DOMAIN_C0033 of domain SH.D violated

The following query determines the columns associated with the constraint:

SELECT column_name, table_name
FROM  all_cons_columns
WHERE owner = 'SH'
AND   constraint_name = 'SYS_C008516';