EXECUTE permission denied on object 'xp_sqlagent_notify', database 'mssqlsystemresource', schema 'sys'.
Granting permissions to relevant account is a required criteria within the SQL Server databases management, for this even Reporting Services is not exceptional. As per the configuration by default the users connect to the report server by using their own Windows domain credentials and integrated security. TO change this criteria you can also configure a report server to use forms authentication if you create and deploy a custom authentication extension, or basic authentication if the report server is deployed in a Workgroup.
Once this authentication process is completed the report server checks for permissions that authorize access to report server content and operations. The permissions are defined in role assignments that describe which tasks a user can perform. Each user who connects to a report server must have role assignments defined on the account that he or she uses to connect to the report server. To clarify further Books ONline clearly states that:
Because the report server is implemented as a Web service and Microsoft Windows service, each service must be able to connect to the database. When configuring the connection to the report server database, you can choose from the following approaches:
- Use the service accounts. Each service runs under its own service account. You can use the service accounts to connect to the database.
- Use a domain account. Both services connect by using the single domain user account that you specify.
- Use a SQL server login. Both services connect by using the single database user account that you specify.
So in order to execute a report that account must have the verification of the RSExecRole which is a database role in the report server database and temporary database. RSExecRole must have select, create, update, delete, and reference permissions on the report server database tables, and execute permissions on the stored procedures.
Few times you may get the following error when you are trying to select the option execution from a report:
 |
EXECUTE permission denied on object 'xp_sqlagent_notify', database 'mssqlsystemresource', schema 'sys'. |
Its a general assumption that if the user has full privileges on the user database and reportserver & reportservertempdb the process is completed, in order to proceed further you should need to grant permissions to SQL Agent stored procedures that are used by Reporting services when you schedule as a job. You can use following TSQL to accomplish the task:
USE
master
GO
GRANT EXECUTE ON
master.dbo.xp_sqlagent_notify TO RSExecRole
GO
GRANT EXECUTE ON
master.dbo.xp_sqlagent_enum_jobs TO RSExecRole
GO
GRANT EXECUTE ON
master.dbo.xp_sqlagent_is_starting TO RSExecRole
GO
USE
msdb
GO
-- Permissions for SQL Agent SP's
GRANT EXECUTE ON
msdb.dbo.sp_help_category TO RSExecRole
GO
GRANT EXECUTE ON
msdb.dbo.sp_add_category TO RSExecRole
GO
GRANT EXECUTE ON
msdb.dbo.sp_add_job TO RSExecRole
GO
GRANT EXECUTE ON
msdb.dbo.sp_add_jobserver TO RSExecRole
GO
GRANT EXECUTE ON
msdb.dbo.sp_add_jobstep TO RSExecRole
GO
GRANT EXECUTE ON
msdb.dbo.sp_add_jobschedule TO RSExecRole
GO
GRANT EXECUTE ON
msdb.dbo.sp_help_job TO RSExecRole
GO
GRANT EXECUTE ON
msdb.dbo.sp_delete_job TO RSExecRole
GO
GRANT EXECUTE ON
msdb.dbo.sp_help_jobschedule TO RSExecRole
GO
GRANT EXECUTE ON
msdb.dbo.sp_verify_job_identifiers TO RSExecRole
GO
GRANT SELECT ON
msdb.dbo.sysjobs TO RSExecRole
GO
GRANT SELECT ON
msdb.dbo.syscategories TO RSExecRole
GO
Also ensure to check whether the RsExecRole is created and consists relevant permission stated above within ReportServer, ReportServerTempDB Databases.
**__________________________________**
SQL Server MVP, Sr. DBA & industry expert.
-
Knowledge is of two kinds. We know a subject ourselves or we know where we can find information on it. It is also a power and you will gain by sharing it.