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.
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
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