Database Error Messages

Release
toggle
  • 23ai
Updated
Jun 24, 2024

OCI-11502

The domain string to be dropped has dependent objects.

Cause

An attempt is made to drop a domain with dependent objects.


Action

Drop the domain using the FORCE mode

DROP DOMAIN <domain_name> FORCE;

or disassociate the domain from all tables dependent on the domain. This query lists the objects the current user has access to that depend on the given domain:

SELECT OWNER, NAME, TYPE FROM ALL_DEPENDENCIES WHERE REFERENCED_NAME=<domain_name> AND REFERENCED_OWNER=<domain_schema> AND REFERENCED_TYPE= 'DOMAIN';

A domain can be dropped from a table with

ALTER TABLE <original_table_name> MODIFY DROP DOMAIN <domain_name>;

Domains can have tables as well as domains as dependents. Dependent domains need to be dropped as well. There can be objects in other schemas that depend on the domain that are not accessible to the current user.