Home Forums SQL Server 2008 SQL Server 2008 - General Who is in the DBO group for all dbs. RE: Who is in the DBO group for all dbs.
Keith Tate
SSCrazy Eights
Points: 9888
More actions
December 3, 2013 at 10:37 am
#1670466
Here is the query:
SELECT
USER_NAME(memberuid) as Member
,USER_NAME(groupuid) as [Group]
FROM
sys.sysmembers
WHERE
USER_NAME(groupuid) = 'db_owner'
and you can use sp_MSforeachdb to run it for all databases on your server.
Forum Etiquette: How to post data/code on a forum to get the best help[/url]