--SQL Server SELECT items.Name AS "Domain Name", items.Definition.value('(/*/Owner)[1]','nvarchar(max)') AS "Owner" FROM sde.GDB_ITEMS AS items INNER JOIN sde.GDB_ITEMTYPES AS itemtypes ON items.Type = itemtypes.UUID WHERE itemtypes.Name IN ('Coded Value Domain', 'Range Domain')
I would double-check to make sure who the owner of the domain is. Take a look at the following link for the correct query:
http://help.arcgis.com/en/arcgisserver/10.0/help/arcgis_server_java_help/index.html#//0092000013v700...
Note: The SQL Server query is for a repository owned by the DBO schema. If your schema is owned by SDE, you will need to update the dbo owner to sde. Ex:--SQL Server SELECT items.Name AS "Domain Name", items.Definition.value('(/*/Owner)[1]','nvarchar(max)') AS "Owner" FROM sde.GDB_ITEMS AS items INNER JOIN sde.GDB_ITEMTYPES AS itemtypes ON items.Type = itemtypes.UUID WHERE itemtypes.Name IN ('Coded Value Domain', 'Range Domain')