i am having problem viewing reporting service reports i created.i get this error.how do i create a user with a trusted SQL Server connection.
the error i get is.but in my studio i see that user 'ReportExecution'.
An error has occurred during report processing. Cannot create a connection to data source 'rs2005sbsDW'. Login failed for user 'ReportExecution'. The user is not associated with a trusted SQL Server connection.
SET @AWSalesDirector = @@SERVERNAME + '\AWSalesDirector' SET @SalesAnalyst = @@SERVERNAME + '\SalesAnalyst'
--drop the users from the database use rs2005sbsDW if exists(select * from sysusers where name='ReportExecution') exec sp_dropuser @name_in_db='ReportExecution' if exists(select * from sysusers where name=@AWSalesDirector) exec sp_revokedbaccess @name_in_db=@AWSalesDirector if exists(select * from sysusers where name=@SalesAnalyst) exec sp_revokedbaccess @name_in_db=@SalesAnalyst
use rs2005sbs if exists(select * from sysusers where name='ReportExecution') exec sp_dropuser @name_in_db='ReportExecution' if exists(select * from sysusers where name=@AWSalesDirector) exec sp_revokedbaccess @name_in_db=@AWSalesDirector if exists(select * from sysusers where name=@SalesAnalyst) exec sp_revokedbaccess @name_in_db=@SalesAnalyst
use msdb if exists(select * from sysusers where name='ReportExecution') exec sp_dropuser @name_in_db='ReportExecution' if exists(select * from sysusers where name=@AWSalesDirector) exec sp_revokedbaccess @name_in_db=@AWSalesDirector if exists(select * from sysusers where name=@SalesAnalyst) exec sp_revokedbaccess @name_in_db=@SalesAnalyst
use ReportServer if exists(select * from sysusers where name='ReportExecution') exec sp_dropuser @name_in_db='ReportExecution' if exists(select * from sysusers where name=@AWSalesDirector) exec sp_revokedbaccess @name_in_db=@AWSalesDirector if exists(select * from sysusers where name=@SalesAnalyst) exec sp_revokedbaccess @name_in_db=@SalesAnalyst
--create the logins use master exec sp_droplogin @loginame='ReportExecution' exec sp_addlogin @loginame='ReportExecution', @passwd='ReportExecutions'
use rs2005sbsdw --add the users to the databases and give them permissions exec sp_adduser @loginame='ReportExecution', @grpname='db_datareader' exec sp_grantdbaccess @AWSalesDirector, @AWSalesDirector exec sp_addrolemember 'db_datareader', @AWSalesDirector exec sp_grantdbaccess @SalesAnalyst, @SalesAnalyst exec sp_addrolemember 'db_datareader', @SalesAnalyst GRANT EXECUTE ON sp_ActualVsQuota TO ReportExecution SELECT @PermissionString = 'GRANT EXECUTE ON sp_ActualVsQuota TO [' COLLATE Latin1_General_CI_AS + @AWSalesDirector + ']' COLLATE Latin1_General_CI_AS EXEC (@PermissionString)
use rs2005sbs --add the users to the databases and give them permissions exec sp_adduser @loginame='ReportExecution', @grpname='db_datareader' exec sp_grantdbaccess @AWSalesDirector, @AWSalesDirector exec sp_addrolemember 'db_datareader', @AWSalesDirector exec sp_grantdbaccess @SalesAnalyst, @SalesAnalyst exec sp_addrolemember 'db_datareader', @SalesAnalyst
use msdb --add the users to the databases and give them permissions exec sp_adduser @loginame='ReportExecution', @grpname='db_datareader' exec sp_grantdbaccess @AWSalesDirector, @AWSalesDirector exec sp_addrolemember 'db_datareader', @AWSalesDirector exec sp_grantdbaccess @SalesAnalyst, @SalesAnalyst exec sp_addrolemember 'db_datareader', @SalesAnalyst
use ReportServer --add the users to the databases and give them permissions exec sp_adduser @loginame='ReportExecution', @grpname='db_datareader' exec sp_grantdbaccess @AWSalesDirector, @AWSalesDirector exec sp_addrolemember 'db_datareader', @AWSalesDirector exec sp_grantdbaccess @SalesAnalyst, @SalesAnalyst exec sp_addrolemember 'db_datareader', @SalesAnalyst
i get this error-------
Changed database context to 'rs2005sbsDW'. Changed database context to 'rs2005sbs'. Changed database context to 'msdb'. Changed database context to 'ReportServer'. Changed database context to 'master'. Msg 15007, Level 16, State 1, Server ZJAFFERI, Procedure sp_droplogin, Line 26 'ReportExecution' is not a valid login or you do not have permission. Msg 15151, Level 16, State 1, Server ZJAFFERI, Line 1 Cannot drop the login 'ZJAFFERI\AWSalesDirector', because it does not exist or you do not have permission. Msg 15151, Level 16, State 1, Server ZJAFFERI, Line 1 Cannot drop the login 'ZJAFFERI\SalesAnalyst', because it does not exist or you do not have permission. Changed database context to 'rs2005sbsDW'. Changed database context to 'rs2005sbs'. Changed database context to 'msdb'. Changed database context to 'ReportServer'.
With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.
The Grade of the Solution
The Zone Rank of the Expert Providing the Solution
The Number of Author and Expert Comments
The Number of Experts Contributing
The Feedback of the Community
Your Input Matters Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.
If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.