Monday, April 4, 2016

Finding Sysadmin on a SQL Server Instance

T-SQL

SELECT NAME, isntname FROM SYSLOGINS
WHERE sysadmin = 1 and hasaccess = 1
EXEC sp_helpsrvrolemember 'sysadmin'

No comments:

Post a Comment