How can we get the Detail of Object and there access in the User Define Role?
Hi Team, How can we get the Detailed list of object and the access in user define role. We have one role in our Database having 1000s of object . Is there any Query which fetch all the object and there access in the role. Thanks Basit Khan
This should work (only tested on Denali CTP3): DECLARE @RoleName varchar(255) set @Rolename = 'public' -- change to fit your role name select dp.name, object_name(perms.major_id), perms.permission_name from sys.database_principals dp inner join sys.database_permissions perms on perms.grantee_principal_id = dp.principal_id where dp.name = @Rolename