failed to delete domain from dataset,the domain is used as default domain

3668
4
10-19-2010 07:33 AM
JoseSanchez
Occasional Contributor III
How can I remove domaisn from a SDE instance?  I am getting the following error emssage:

"failed to delete domain from dataset, the domain is used as default domain "

Please advice
0 Kudos
4 Replies
NickKenczka
New Contributor II
How can I remove domaisn from a SDE instance?  I am getting the following error emssage:

"failed to delete domain from dataset, the domain is used as default domain "

Please advice


Jose,

Did you ever figure this one out?  I'm having the same issue as we speak
0 Kudos
claystevens
New Contributor II
Same problem.   Does anybody have any solutions?
0 Kudos
HenrikSvenningsen
Occasional Contributor
If you are using the domain on af dataset or feature class, then you can't delete it. You'll have to find where you are using it (i think there is a script for that) an change that before you can delete.
0 Kudos
NanaDei
Esri Contributor
SQL from the following link can be used in finding which feature classes are using a specific domain in an ArcSDE 10 geodatabase.

--
http://help.arcgis.com/en/arcgisserver/10.0/help/arcgis_server_dotnet_help/index.html#/Discovering_d...



The following queries can be used with a 93 sde geodatabases.
----
1. This sql  lists all the domains that have been applied at the feature class level:

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


2. This sql lists all the domains that have been applied at the subtype level:

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
============

Thanks