SQL SERVER – List Users with System Admin (sysadmin) Rights

One of the pre-requesting of Comprehensive Database Performance Health Check is to check if user has necessary system admin rights or not. It is almost impossible to help customer with SQL Server Performance if they do have a DBA who has access to system admin rights.

SQL SERVER - List Users with System Admin (sysadmin) Rights sysadminrights-800x305

Please note that I NEVER ask for any username or password, during the consultation. My performance tuning technique is such where I will guide you step by step about how you can tune your SQL Server yourself. I teach you with every single click and also I teach you how to use all the scripts which I provide during consultancy. Everything is scientific and systematic. However, there is one requirement in this arrangement.

The DBA who is on the other side of the computer MUST have a system admin rights. If he doe snot have enough rights we will be able to do only limited exercise with regards to performance. Most of my diagnosis scripts only work with sysadmin rights.

Here is the quick script which you can run and list all the users with admin rights. If you find your username there, you know you are an admin.

SELECT name,type_desc,is_disabled, create_date
FROM master.sys.server_principals
WHERE IS_SRVROLEMEMBER ('sysadmin',name) = 1
ORDER BY name

Let me know if you use any other script. I will be happy to publish that on blog with due credit to you.

Reference: Pinal Dave (https://blog.sqlauthority.com)

, SQL Scripts, SQL Server, SQL Server Security
Previous Post
SQL SERVER- New DMF in SQL Server 2017 – sys.dm_os_file_exists. A Replacement of xp_fileexist
Next Post
SQL SERVER – List Users with System Admin (sysadmin) Rights – Part 2

Related Posts

Leave a Reply