How to get report level permission on Report Server

SELECT C.Name,U.UserName,R.RoleName,R.Description,U.AuthType FROM ReportServer_SQL2008_Prod.dbo.Users U
JOIN ReportServer_SQL2008_Prod.dbo.PolicyUserRole PUR
ON U.UserID = PUR.UserID
JOIN ReportServer_SQL2008_Prod.dbo.Policies P
ON P.PolicyID = PUR.PolicyID
JOIN ReportServer_SQL2008_Prod.dbo.Roles R
ON R.RoleID = PUR.RoleID
JOIN ReportServer_SQL2008_Prod.dbo.Catalog c
ON C.PolicyID = P.PolicyID

Note- For a specific report use below code
SELECT C.Name,U.UserName,R.RoleName,R.Description,U.AuthType
FROM ReportServer_SQL2008_Prod.dbo.Users U
JOIN ReportServer_SQL2008_Prod.dbo.PolicyUserRole PUR
ON U.UserID = PUR.UserID
JOIN ReportServer_SQL2008_Prod.dbo.Policies P
ON P.PolicyID = PUR.PolicyID
JOIN ReportServer_SQL2008_Prod.dbo.Roles R
ON R.RoleID = PUR.RoleID
JOIN ReportServer_SQL2008_Prod.dbo.Catalog c
ON C.PolicyID = P.PolicyID
WHERE c.Name = @name of your report
ORDER BY U.UserName

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s