all groups > sql server (alternate) > november 2005 >
You're in the

sql server (alternate)

group:

Show owner of database


Show owner of database andreas.bjorck NO[at]SPAM gmail.com
11/29/2005 6:26:32 AM
sql server (alternate):
Hello,

Does anyone know what procedure to run to show information such as the
owner of a specific database for MSSQL2000? I want to make a script to
loop through all the databases on a server and display owner and other
helpful information.

Best regards,
Andreas
Re: Show owner of database Mark D Powell
11/29/2005 6:37:08 AM
Andreas, I think the following query will work for what you want:

Use MASTER
SELECT name, SUSER_SNAME(sid)
FROM sysdatabases

HTH -- Mark D Powell --
AddThis Social Bookmark Button