I'm trying to delete domain, but i can't because it is in use at an attribute domain. How can I find out at which layer and which subtype ? I have a big geodatabase with more than 30 layers an each one have few subtypes ?
There is a number of toolboxes that let you work with the geodatabases (analyze feature classes, compare workspaces, etc). The toolboxes can be downloaded from here. You can reuse some of those tools in your work. The easiest way to list the fields and see what domains are used (you need to delete domains from fields first before you will be able to delete domains itselves as you realized already) is to use a simple Python code which I copied from another post at GIS.SE:
import arcpy #Set workspace environment to geodatabase arcpy.env.workspace = your_gdb #Get list of feature classes in geodatabase FCs = arcpy.ListFeatureClasses() #Loop through feature classes in list for FC in FCs: #List fields in feature class fields = arcpy.ListFields(FC) #Loop through fields for field in fields: #Check if field has domain if field.domain != "": #Print feature class, field, domain name print FC, field.name, field.domain