Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Looking to add Role to sql, anyone help?

Author  Topic 

Bill_C
Constraint Violating Yak Guru

299 Posts

Posted - 2009-09-24 : 09:48:55
I need to add role (server & database role) to the following code

SELECT a.NAME AS [schema],b.NAME AS [table],d.NAME AS logon, e.state_desc AS permissiontype ,b.type_desc AS [type]
from sys.schemas a
JOIN sys.objects b ON a.schema_id = b.schema_id
JOIN sys.database_role_members c ON a.principal_id = c.member_principal_id
JOIN sys.database_permissions e ON a.principal_id = e.grantee_principal_id
JOIN sys.database_principals d ON e.grantee_principal_id = d.principal_id
ORDER BY logon


can anyone point me/show me to where i culd get it?
   

- Advertisement -