Query execution failed for dataset (rsErrorExecutingCommand) / SELECT permission was denied on the object

After resolving the permissions issue for 'NT AUTHORITY\NETWORK SERVICE'  i landed on the following error upon accessing the aspx page where i have a Microsoft.Reporting.Webforms.Reportviewer control embedded.


An error has occurred during report processing. (rsProcessingAborted)
Query execution failed for dataset 'dataset1'. (rsErrorExecutingCommand)
For more information about this error navigate to the report server on the local server machine, or enable remote errors 

To find out the exact error:
1. Navigate to C:\Program Files\Microsoft SQL Server\MSSQL.3\Reporting Services\LogFiles\ReportServer__10_09_2012_17_05_27.log

2. Located the following error

 Info: Microsoft.ReportingServices.ReportProcessing.ProcessingAbortedException: An error has occurred during report processing. ---> Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: Query execution failed for data set 'dataset1'. ---> System.Data.SqlClient.SqlException: The SELECT permission was denied on the object 'T_TABLE1', database 'TestDatabase', schema 'dbo'.

Resolution:
1. Open the SQL Server Management studio
2. Right click on the respective database (TestDatabase) and select properties. Under Properties add the following user if not existing already: NT AUTHORITY\NETWORK SERVICE.
3. give the "Select" and "Execute" permissions to the NT AUTHORITY\NETWORK SERVICE:


4. Press OK and retry accessing the report through aspx page. You should not see the error anymore.


Comments

Anonymous said…
I just dealth with this same issue, make sure your query lists the full source name and no shortcuts. Visual Studio can recognize the shortcuts but your reporting services application may not be able to recognize which tables your data should be coming from. Hope that helps.
Anonymous said…
Thanks, Worked perfectly for me.. Very well explained.
!techaz said…
Ty, worked for me tooo!!!
Dinesh Kumar said…
Superb! I checked Reporting server logs

C:\Program Files\Microsoft SQL Server\MSRS11.MSSQLSERVER\Reporting Services\LogFiles

C:\Program Files\Microsoft SQL Server\MSRS13.MSSQLSERVER\Reporting Services\LogFiles

and found that there was execution permission was not there so
I provided that to IUSR

Popular posts from this blog

Load data from CSV into HIVE table using HUE browser

Gitlab change project visibility from private to internal

Setting property 'keystoreFile' did not find a matching property. No Certificate file specified or invalid file format