OCI-11538
Cause
An attempt is made to drop a domain with dependent objects in the recycle bin.
Action
Drop the domain using the FORCE mode
DROP DOMAIN <domain_name> FORCE;
or purge the recycle bin
PURGE RECYLEBIN;
or purge each table in the recyle bin that depends on the domain, or restore tables in the recycle bin and disassociate them from the domain. This query lists tables owner by the current user that are in the recycle bin and that depend on the given domain:
SELECT d.OWNER, d.NAME, r.ORIGINAL_NAME FROM ALL_DEPENDENCIES d, USER_RECYCLEBIN r WHERE d.REFERENCED_NAME=<domain_name> AND d.REFERENCED_OWNER=<domain_schema> AND d.REFERENCED_TYPE= 'DOMAIN' AND d.TYPE ='TABLE' AND r.OBJECT_NAME = d.NAME;
You can restore such tables with
FLASHBACK TABLE <table_name> TO BEFORE DROP;
and either purge them with
DROP TABLE <original_table_name> PURGE;
or drop domain from them
ALTER TABLE <original_table_name> MODIFY DROP DOMAIN <domain_name>;
There can be tables in other schemas that depend on the domain and are in the recycle bin of their owner schema.