HOW TO
In order to delete or modify a domain, it must not be associated with any fields in the geodatabase. SQL queries are provided below to list each domain association. These queries are applicable to ArcSDE for Oracle and ArcSDE for SQL Server 9.0 and 9.1.However, be aware that if there are any changes to the geodatabase metadata schema relating to domains in future releases of ArcSDE, then these queries may not give the correct results. Therefore, this information is for internal use only.
For ArcSDE for Oracle, the following optional commands will make the output more readable in SQLPlus:
Code:
column Object_Owner format a15
column Domain_Owner format a15
column Domain_Name format a15
column Object_Name format a15
column Field_Name format a15
column Subtype_Name format a15
The following queries can be run in either SQLPlus for Oracle or Query Analyzer for SQL Server:
Query to list domains applied at the feature class level:
Code:
SELECT DO.owner Domain_Owner, FI.defaultdomainname Domain_Name,OC.owner Object_Owner,OC.name Object_Name,FI.fieldname Field_Name
FROM sde.gdb_objectclasses OC,sde.gdb_fieldinfo FI, sde.gdb_domains DO
WHERE OC.id=FI.classid AND DO.domainname=FI.defaultdomainname
AND FI.defaultdomainname IS NOT NULL
ORDER BY Domain_Owner, Domain_Name,Object_Owner,Object_Name
Query to list domains associated at the subtype level:
Code:
SELECT DM.owner Domain_Owner,DM.domainname Domain_Name,OC.name Object_Name,ST.subtypename Subtype_Name,AR.fieldname Field_Name
FROM sde.gdb_domains DM,sde.gdb_objectclasses OC,sde.gdb_subtypes ST,sde.gdb_attrrules AR,sde.gdb_validrules VR
WHERE (AR.domainname=DM.domainname) AND (AR.ruleid=VR.id) AND (VR.classid = OC.id) AND(AR.subtype=ST.subtypecode)
ORDER BY Domain_Owner,Domain_Name,Object_Name,Subtype_Name
Note:
If these SQL queries are in SQLPlus, be sure to add a ";" to the end of each statement.
Article ID:000007998
Get help from ArcGIS experts
Download the Esri Support App