You can use SQL to find the owners of all domains in a geodatabase by querying the geodatabase system tables GDB_ItemTypes and GDB_Items.
The following examples show how to extract a value from a specific XML document to find the owners of all domains in a specific geodatabase in SQL Server or PostgreSQL.
Be sure to connect to the correct database before executing this query.
--SQL Server
SELECT items.Name AS "Domain Name",
items.Definition.value('(/*/Owner)[1]','nvarchar(max)') AS "Owner"
FROM dbo.GDB_ITEMS AS items INNER JOIN dbo.GDB_ITEMTYPES AS itemtypes
ON items.Type = itemtypes.UUID
WHERE itemtypes.Name IN ('Coded Value Domain', 'Range Domain')
--PostgreSQL
SELECT items.name AS "Domain Name",
(xpath('//Owner/text()', definition))[1]::text 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');