Home > Archive > Microsoft SQL Server forum > November 2005 > Show owner of database









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Show owner of database
andreas.bjorck@gmail.com

2005-11-29, 9:24 am

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

Mark D Powell

2005-11-29, 9:24 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 --

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com