MCITP

MCITP

Tuesday, September 11, 2012

Script to list all users having access on extended stored procedure in SQL SERVER.

The script will list all the users that are having the access on the extended stored procedure.

SELECT     SystemObject.name AS [Extended storedProcedure] , USER_NAME(SystemPermissionObject.grantee) AS [Granted to]
FROM sys.all_objects AS SystemObject INNER JOIN master.dbo.syspermissions AS SystemPermissionObject ON SystemObject.object_id = SystemPermissionObject.id
WHERE   (SystemObject.type = 'X')ORDER BY SystemObject.name

No comments:

Post a Comment

Followers