Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase ««12

Getting IS_Member to work as expected Expand / Collapse
Author
Message
Posted Friday, November 29, 2013 10:08 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Wednesday, December 18, 2013 7:15 PM
Points: 1, Visits: 1
SELECT COALESCE((SELECT 1
FROM sys.database_principals DPR
INNER JOIN sys.database_role_members Member ON DPR.principal_id = Member.role_principal_id
INNER JOIN sys.database_principals DPU ON member.member_principal_id = dpu.principal_id
WHERE DPR.NAME = 'MyRole'
AND dpu.NAME = ORIGINAL_LOGIN() ),0) as MyRole

Post #1518575
« Prev Topic | Next Topic »

Add to briefcase ««12

Permissions Expand / Collapse