Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Administration
 How to find list of admin users in db?

Author  Topic 

arvind_ramugade
Starting Member

30 Posts

Posted - 2012-04-16 : 08:31:13
Hi All,
I'm quite new to MSSQL.
Would like to know how to find list of admin users in db?

Regards



ramugade

Transact Charlie
Master Smack Fu Yak Hacker

3451 Posts

Posted - 2012-04-16 : 10:00:05
Does the result of this look like what you need?


SELECT
[loginName]
, *
FROM
sys.syslogins
WHERE
[sysadmin] = 1


If not then we probably need to know what you mean by 'admin users'

Charlie
===============================================================
Msg 3903, Level 16, State 1, Line 1736
The ROLLBACK TRANSACTION request has no corresponding BEGIN TRANSACTION
Go to Top of Page

sunitabeck
Master Smack Fu Yak Hacker

5155 Posts

Posted - 2012-04-16 : 10:25:44
You can also use

exec sp_helpsrvrolemember @srvrolename = 'sysadmin'
Various other "admin" roles are listed here: http://msdn.microsoft.com/en-us/library/ms188659(v=sql.100).aspx
Go to Top of Page
   

- Advertisement -