May 12, 2011 at 7:49 am
I created database role and granted select permission to it
Create role db_testrole
go
Grant select to db_testrole
go
However following sp not showing that role and permission
EXEC sp_dbfixedrolepermission;
is there any other sp to check this?
May 12, 2011 at 9:37 am
Try this code to determine if it is what you require.
SELECT
u.name COLLATE Latin1_General_CI_AS AS 'User',
schema_name(o.schema_id) As 'Schema',
o.name COLLATE Latin1_General_CI_AS AS 'Object' ,
p.permission_name COLLATE Latin1_General_CI_AS AS 'Action'
into #tmp
FROM sys.database_permissions p, sys.database_principals u, sys.all_objects o
WHERE o.object_id = p.major_id
AND u.name = 'Db_TestRole'
SELECT * FROM #tmp
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply