I query information_schema.table_privileges for permissions to tables
What do I query to get list of all permsissions grants on stored procedures
and udf's?
tia
chrisChris
In SQL Server 2005, you can use the Has_Perms_By_Name() function
(http://msdn2.microsoft.com/en-us/library/ms189802.aspx).
> For example, I would like to list all stored procedures which a role has
> execute permission for.
This is an example of usage:
SELECT o.SchemaAndName,
has_perms_by_name(o.SchemaAndName, 'OBJECT', 'EXECUTE')
FROM (SELECT name, SCHEMA_NAME(schema_id) AS [schema],
SCHEMA_NAME(schema_id)+'.'+name AS SchemaAndName
FROM sys.objects
WHERE type = 'P') AS o
"Chris" <Chris@.discussions.microsoft.com> wrote in message
news:3303F0F9-082F-48B1-AD48-0406FDB03761@.microsoft.com...
> I query information_schema.table_privileges for permissions to tables
> What do I query to get list of all permsissions grants on stored
> procedures
> and udf's?
> tia
> chris
Monday, March 12, 2012
How to list sp perms?
Labels:
database,
grants,
information_schema,
microsoft,
mysql,
oracle,
permissions,
perms,
permsissions,
proceduresand,
query,
server,
sql,
stored,
table_privileges,
tableswhat
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment