-- Below will provide the Job Owner Details
SELECT s.name AS JobName, l.name AS JobOwner, s.enabled
FROM msdb..sysjobs s
LEFT JOIN master.sys.syslogins l ON s.owner_sid = l.sid
WHERE l.name IS NOT NULL and l.name in ('Domain\User' )
ORDER by l.name
-- Below will provide DB Owners
SELECT name,
suser_sname( owner_sid ) AS DBOwnerName
FROM master.sys.databases
WHERE suser_sname( owner_sid )in ('Domain\User' )
--- Below will provide Each Object Owners
;with objects_cte as
(
select
o.name,
o.type_desc,
case
when o.principal_id is null then s.principal_id
else o.principal_id
end as principal_id
from sys.objects o
inner join sys.schemas s
on o.schema_id = s.schema_id
where o.is_ms_shipped = 0
and o.type in ('U', 'FN', 'FS', 'FT', 'IF', 'P', 'PC', 'TA', 'TF', 'TR', 'V')
)
select
cte.name,
cte.type_desc,
dp.name
from objects_cte cte
inner join sys.database_principals dp
on cte.principal_id = dp.principal_id
where dp.name in ('Domain\User' ) or dp.name <>'dbo'