Home > SQL > Check for Store procedure Permission

Check for Store procedure Permission

SELECT	o.TYPE_DESC,
		o.NAME AS OBJECTNAME,
		dp.PERMISSION_NAME,
		dp.STATE_DESC,
		p.NAME
FROM		SYS.DATABASE_PERMISSIONS AS dp
INNER JOIN	SYS.OBJECTS AS o ON o.OBJECT_ID = dp.MAJOR_ID
INNER JOIN	SYS.DATABASE_PRINCIPALS AS p
 ON p.PRINCIPAL_ID = dp.GRANTEE_PRINCIPAL_ID
WHERE	dp.CLASS = 1
order by OBJECTNAME
Advertisements
Categories: SQL
  1. No comments yet.
  1. September 7, 2011 at 4:47 am

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s

%d bloggers like this: