Re: Roles and permission mapping table
- From: Munish Narula <munish.narula@xxxxxxxxx>
- Date: Thu, 20 Nov 2008 02:02:01 -0800
Thanks for the reply.
But can i get a query/script for getting this data.
"Uri Dimant" wrote:
Start with.
------http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_pa-pz_6f78.asp>
How can I retrieve a list of objects and permissions for a specified role?
------------------------------------------------------------------------------
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
"Munish Narula" <munish.narula@xxxxxxxxx> wrote in message
news:8C928ADD-7A67-4432-91B1-8635B7027322@xxxxxxxxxxxxxxxx
I need to know all the permissions available in MS SQL 2005 and also the
privilleges that each role has been given.
Is there any system table in SQL 2005 from where i can get both these
information.
Thanks in advance.
- Follow-Ups:
- Re: Roles and permission mapping table
- From: Uri Dimant
- Re: Roles and permission mapping table
- References:
- Roles and permission mapping table
- From: Munish Narula
- Re: Roles and permission mapping table
- From: Uri Dimant
- Roles and permission mapping table
- Prev by Date: Re: Roles and permission mapping table
- Next by Date: Re: Roles and permission mapping table
- Previous by thread: Re: Roles and permission mapping table
- Next by thread: Re: Roles and permission mapping table
- Index(es):
Relevant Pages
|