Posts Tagged ‘Permissions’

Server Roles with TSQL

Here’s a few bits of TSQL you can use when working with Server-Level Roles in SQL Server 2012. List the server roles setup on an instance… ?View Code TSQLEXEC sp_helpsrvrole; List the members of a role… ?View Code TSQLEXEC sp_helpsrvrolemember ‘sysadmin’; List the permissions assigned to a server-level role… ?View Code TSQLEXEC sp_srvrolepermission ‘sysadmin’; Test […]

SQL to Grant EXECUTE & SELECT permission to all Procedures and Functions

I was Googling around the other day for a bit of TSQL to quickly grant a user permission to use all procedures and functions and came across the following post. We have a few table -valued functions in our system so this script buckled with the following error; Msg 4606, Level 16, State 1, Line […]