How to check user with sysadmin role

SELECT name,type_desc,is_disabled
FROM master.sys.server_principals
WHERE IS_SRVROLEMEMBER (‘sysadmin’,name) = 1

Leave a Reply

Your email address will not be published. Required fields are marked *