:::: MENU ::::

Server roles for SQL Server

  • Nov 11 / 2008
  • 0
dbDigger, Monitoring and Analysis, Security and Permissions, T-SQL Scripts

Server roles for SQL Server

A login may be member of a Server role or database role. Member of server roles have permissions for SQL Server instance level tasks.Following script will show that which SQL Server login is member of a particular server role.

select p.name, p.type_desc, pp.name, pp.type_desc  
 from sys.server_role_members roles  
 join sys.server_principals p on roles.member_principal_id = p.principal_id  
 join sys.server_principals pp on roles.role_principal_id = pp.principal_id  
 GO  
Consult us to explore the Databases. Contact us