The below script can be used to find out the users with sysadmin role in SQL Server.
SELECT SP.name AS LoginName, type_desc AS LoginType, Cast(create_date AS DATE) DateCreated FROM sys.server_principals SP inner join sys.syslogins SL on SP.sid=SL.sid WHERE SL.sysadmin=1
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.