The document creates login accounts and database roles to grant limited permissions to services that help manage SQL Server policies. A login called ##MS_PolicyEventProcessingLogin## is created with disabled status and random password for policy event processing. This login is given various permissions in the msdb database and made a member of roles for policy administration and SQL Agent tasks. Another login ##MS_PolicyTsqlExecutionLogin## is similarly created for TSQL execution related to policies.
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Permissions script for SQL Permissions
1. /*********** Permissions Script for WRON023KEYKO Login ##MS_PolicyEventProcessingLogin##
Generated 2011-10-16 16:22:45 ***************/
--Scripting Server Login (password is null) and Default Database
/* For security reasons the login is created disabled and with a random password. */
IF NOT EXISTS (SELECT * FROM sys.server_principals WHERE name =
N'##MS_PolicyEventProcessingLogin##')
BEGIN
CREATE LOGIN [##MS_PolicyEventProcessingLogin##] WITH
PASSWORD=N'îK''îΓN_g“Â_!é@ôz«7_§Oæö½_VˬU#4', DEFAULT_DATABASE=[master],
DEFAULT_LANGUAGE=[us_english], CHECK_EXPIRATION=OFF, CHECK_POLICY=ON
ALTER LOGIN [##MS_PolicyEventProcessingLogin##] DISABLE
END
--Scripting Server Roles
USE [master]
GO
--Grant Database Access
IF NOT EXISTS (SELECT * FROM sys.database_principals WHERE name =
N'##MS_PolicyEventProcessingLogin##')
CREATE USER [##MS_PolicyEventProcessingLogin##] FOR LOGIN
[##MS_PolicyEventProcessingLogin##] WITH DEFAULT_SCHEMA=[dbo]
--Scripting Object and Statement Permissions
USE [master]
GO
Grant CONNECT ON Database::[master] TO [##MS_PolicyEventProcessingLogin##]
GO
USE [master]
GO
Grant EXECUTE ON [sys].[sp_syspolicy_execute_policy] TO
[##MS_PolicyEventProcessingLogin##]
GO
USE [msdb]
GO
2. --Grant Database Access
IF NOT EXISTS (SELECT * FROM sys.database_principals WHERE name =
N'##MS_PolicyEventProcessingLogin##')
CREATE USER [##MS_PolicyEventProcessingLogin##] FOR LOGIN
[##MS_PolicyEventProcessingLogin##] WITH DEFAULT_SCHEMA=[dbo]
--Create Database Role
USE [msdb]
GO
IF NOT EXISTS (SELECT * FROM sys.database_principals WHERE name =
N'PolicyAdministratorRole' AND type = 'R')
CREATE ROLE [PolicyAdministratorRole] AUTHORIZATION [dbo]
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_syspolicy_add_condition] TO [PolicyAdministratorRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_syspolicy_add_object_set] TO [PolicyAdministratorRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_syspolicy_add_policy] TO [PolicyAdministratorRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_syspolicy_add_policy_category] TO [PolicyAdministratorRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_syspolicy_add_policy_category_subscription] TO
[PolicyAdministratorRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_syspolicy_add_target_set] TO [PolicyAdministratorRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_syspolicy_add_target_set_level] TO [PolicyAdministratorRole]
GO
USE [msdb]
GO
3. Grant EXECUTE ON [dbo].[sp_syspolicy_configure] TO [PolicyAdministratorRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_syspolicy_create_purge_job] TO [PolicyAdministratorRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_syspolicy_delete_condition] TO [PolicyAdministratorRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_syspolicy_delete_object_set] TO [PolicyAdministratorRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_syspolicy_delete_policy] TO [PolicyAdministratorRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_syspolicy_delete_policy_category] TO [PolicyAdministratorRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_syspolicy_delete_policy_category_subscription] TO
[PolicyAdministratorRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_syspolicy_dispatch_event] TO [PolicyAdministratorRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_syspolicy_log_policy_execution_detail] TO
[PolicyAdministratorRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_syspolicy_log_policy_execution_end] TO
[PolicyAdministratorRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_syspolicy_log_policy_execution_start] TO
[PolicyAdministratorRole]
GO
USE [msdb]
4. GO
Grant EXECUTE ON [dbo].[sp_syspolicy_purge_health_state] TO [PolicyAdministratorRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_syspolicy_purge_history] TO [PolicyAdministratorRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_syspolicy_rename_condition] TO [PolicyAdministratorRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_syspolicy_rename_policy] TO [PolicyAdministratorRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_syspolicy_rename_policy_category] TO [PolicyAdministratorRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_syspolicy_repair_policy_automation] TO
[PolicyAdministratorRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_syspolicy_set_config_enabled] TO [PolicyAdministratorRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_syspolicy_set_config_history_retention] TO
[PolicyAdministratorRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_syspolicy_set_log_on_success] TO [PolicyAdministratorRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_syspolicy_update_condition] TO [PolicyAdministratorRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_syspolicy_update_policy] TO [PolicyAdministratorRole]
GO
USE [msdb]
GO
5. Grant EXECUTE ON [dbo].[sp_syspolicy_update_policy_category] TO [PolicyAdministratorRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_syspolicy_update_policy_category_subscription] TO
[PolicyAdministratorRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_syspolicy_update_target_set] TO [PolicyAdministratorRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_syspolicy_update_target_set_level] TO [PolicyAdministratorRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_syspolicy_verify_object_set_identifiers] TO
[PolicyAdministratorRole]
GO
USE [msdb]
GO
Grant SELECT ON [dbo].[syspolicy_conditions] TO [PolicyAdministratorRole]
GO
USE [msdb]
GO
Grant SELECT ON [dbo].[syspolicy_configuration] TO [PolicyAdministratorRole]
GO
USE [msdb]
GO
Grant SELECT ON [dbo].[syspolicy_object_sets] TO [PolicyAdministratorRole]
GO
USE [msdb]
GO
Grant SELECT ON [dbo].[syspolicy_policies] TO [PolicyAdministratorRole]
GO
USE [msdb]
GO
Grant SELECT ON [dbo].[syspolicy_policy_categories] TO [PolicyAdministratorRole]
GO
USE [msdb]
GO
Grant SELECT ON [dbo].[syspolicy_policy_category_subscriptions] TO
[PolicyAdministratorRole]
GO
USE [msdb]
GO
6. Grant SELECT ON [dbo].[syspolicy_policy_execution_history] TO [PolicyAdministratorRole]
GO
USE [msdb]
GO
Grant SELECT ON [dbo].[syspolicy_policy_execution_history_details] TO
[PolicyAdministratorRole]
GO
USE [msdb]
GO
Grant SELECT ON [dbo].[syspolicy_system_health_state] TO [PolicyAdministratorRole]
GO
USE [msdb]
GO
Grant SELECT ON [dbo].[syspolicy_target_set_levels] TO [PolicyAdministratorRole]
GO
USE [msdb]
GO
Grant SELECT ON [dbo].[syspolicy_target_sets] TO [PolicyAdministratorRole]
GO
--Scripting Database Role Members
USE [msdb]
GO
exec sp_addrolemember N'PolicyAdministratorRole', N'##MS_PolicyEventProcessingLogin##'
GO
--Create Database Role
USE [msdb]
GO
IF NOT EXISTS (SELECT * FROM sys.database_principals WHERE name = N'SQLAgentOperatorRole'
AND type = 'R')
CREATE ROLE [SQLAgentOperatorRole] AUTHORIZATION [dbo]
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_enum_login_for_proxy] TO [SQLAgentOperatorRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_help_alert] TO [SQLAgentOperatorRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_help_notification] TO [SQLAgentOperatorRole]
GO
7. USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_help_targetserver] TO [SQLAgentOperatorRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_purge_jobhistory] TO [SQLAgentOperatorRole]
GO
USE [msdb]
GO
Grant SELECT ON [dbo].[sysalerts] TO [SQLAgentOperatorRole]
GO
USE [msdb]
GO
Grant SELECT ON [dbo].[sysnotifications] TO [SQLAgentOperatorRole]
GO
USE [msdb]
GO
Grant SELECT ON [dbo].[sysoperators] TO [SQLAgentOperatorRole]
GO
exec sp_addrolemember N'SQLAgentOperatorRole', N'##MS_PolicyEventProcessingLogin##'
GO
--Create Database Role
USE [msdb]
GO
IF NOT EXISTS (SELECT * FROM sys.database_principals WHERE name = N'SQLAgentReaderRole'
AND type = 'R')
CREATE ROLE [SQLAgentReaderRole] AUTHORIZATION [dbo]
exec sp_addrolemember N'SQLAgentReaderRole', N'##MS_PolicyEventProcessingLogin##'
GO
--Create Database Role
USE [msdb]
GO
IF NOT EXISTS (SELECT * FROM sys.database_principals WHERE name = N'SQLAgentUserRole' AND
type = 'R')
CREATE ROLE [SQLAgentUserRole] AUTHORIZATION [dbo]
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_add_job] TO [SQLAgentUserRole]
GO
8. USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_add_jobschedule] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_add_jobserver] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_add_jobstep] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_add_schedule] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_addtask] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_attach_schedule] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_check_for_owned_jobs] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_check_for_owned_jobsteps] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_delete_job] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_delete_jobschedule] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_delete_jobserver] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_delete_jobstep] TO [SQLAgentUserRole]
9. GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_delete_jobsteplog] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_delete_schedule] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_detach_schedule] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_droptask] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_enum_sqlagent_subsystems] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_get_job_alerts] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_get_jobstep_db_username] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_get_sqlagent_properties] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_help_category] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_help_job] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_help_jobactivity] TO [SQLAgentUserRole]
GO
USE [msdb]
10. GO
Grant EXECUTE ON [dbo].[sp_help_jobcount] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_help_jobhistory] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_help_jobhistory_full] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_help_jobhistory_sem] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_help_jobhistory_summary] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_help_jobs_in_schedule] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_help_jobschedule] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_help_jobserver] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_help_jobstep] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_help_jobsteplog] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_help_operator] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_help_proxy] TO [SQLAgentUserRole]
GO
11. USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_help_schedule] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_maintplan_subplans_by_job] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_notify_operator] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_start_job] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_stop_job] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_uniquetaskname] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_update_job] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_update_jobschedule] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_update_jobstep] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_update_schedule] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant SELECT ON [dbo].[syscategories] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
12. Grant SELECT ON [dbo].[sysjobs_view] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant SELECT ON [dbo].[sysschedules_localserver_view] TO [SQLAgentUserRole]
GO
exec sp_addrolemember N'SQLAgentUserRole', N'##MS_PolicyEventProcessingLogin##'
GO
--Scripting Object and Statement Permissions
USE [msdb]
GO
Grant CONNECT ON Database::[msdb] TO [##MS_PolicyEventProcessingLogin##]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_syspolicy_events_reader] TO [##MS_PolicyEventProcessingLogin##]
GO
/*********** Permissions Script for WRON023KEYKO Login ##MS_PolicyTsqlExecutionLogin##
Generated 2011-10-16 16:22:51 ***************/
--Scripting Server Login (password is null) and Default Database
/* For security reasons the login is created disabled and with a random password. */
IF NOT EXISTS (SELECT * FROM sys.server_principals WHERE name =
N'##MS_PolicyTsqlExecutionLogin##')
BEGIN
CREATE LOGIN [##MS_PolicyTsqlExecutionLogin##] WITH PASSWORD=N'_á*³*óÎõÁ·¹%"_G)
“¹`&]ç(æØ]þX*0_', DEFAULT_DATABASE=[master], DEFAULT_LANGUAGE=[us_english],
CHECK_EXPIRATION=OFF, CHECK_POLICY=ON
ALTER LOGIN [##MS_PolicyTsqlExecutionLogin##] DISABLE
END
--Scripting Server Roles
USE [msdb]
GO
13. --Grant Database Access
IF NOT EXISTS (SELECT * FROM sys.database_principals WHERE name =
N'##MS_PolicyTsqlExecutionLogin##')
CREATE USER [##MS_PolicyTsqlExecutionLogin##] FOR LOGIN [##MS_PolicyTsqlExecutionLogin##]
WITH DEFAULT_SCHEMA=[dbo]
--Create Database Role
USE [msdb]
GO
IF NOT EXISTS (SELECT * FROM sys.database_principals WHERE name =
N'PolicyAdministratorRole' AND type = 'R')
CREATE ROLE [PolicyAdministratorRole] AUTHORIZATION [dbo]
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_syspolicy_add_condition] TO [PolicyAdministratorRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_syspolicy_add_object_set] TO [PolicyAdministratorRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_syspolicy_add_policy] TO [PolicyAdministratorRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_syspolicy_add_policy_category] TO [PolicyAdministratorRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_syspolicy_add_policy_category_subscription] TO
[PolicyAdministratorRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_syspolicy_add_target_set] TO [PolicyAdministratorRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_syspolicy_add_target_set_level] TO [PolicyAdministratorRole]
GO
USE [msdb]
GO
14. Grant EXECUTE ON [dbo].[sp_syspolicy_configure] TO [PolicyAdministratorRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_syspolicy_create_purge_job] TO [PolicyAdministratorRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_syspolicy_delete_condition] TO [PolicyAdministratorRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_syspolicy_delete_object_set] TO [PolicyAdministratorRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_syspolicy_delete_policy] TO [PolicyAdministratorRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_syspolicy_delete_policy_category] TO [PolicyAdministratorRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_syspolicy_delete_policy_category_subscription] TO
[PolicyAdministratorRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_syspolicy_dispatch_event] TO [PolicyAdministratorRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_syspolicy_log_policy_execution_detail] TO
[PolicyAdministratorRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_syspolicy_log_policy_execution_end] TO
[PolicyAdministratorRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_syspolicy_log_policy_execution_start] TO
[PolicyAdministratorRole]
GO
USE [msdb]
15. GO
Grant EXECUTE ON [dbo].[sp_syspolicy_purge_health_state] TO [PolicyAdministratorRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_syspolicy_purge_history] TO [PolicyAdministratorRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_syspolicy_rename_condition] TO [PolicyAdministratorRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_syspolicy_rename_policy] TO [PolicyAdministratorRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_syspolicy_rename_policy_category] TO [PolicyAdministratorRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_syspolicy_repair_policy_automation] TO
[PolicyAdministratorRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_syspolicy_set_config_enabled] TO [PolicyAdministratorRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_syspolicy_set_config_history_retention] TO
[PolicyAdministratorRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_syspolicy_set_log_on_success] TO [PolicyAdministratorRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_syspolicy_update_condition] TO [PolicyAdministratorRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_syspolicy_update_policy] TO [PolicyAdministratorRole]
GO
USE [msdb]
GO
16. Grant EXECUTE ON [dbo].[sp_syspolicy_update_policy_category] TO [PolicyAdministratorRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_syspolicy_update_policy_category_subscription] TO
[PolicyAdministratorRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_syspolicy_update_target_set] TO [PolicyAdministratorRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_syspolicy_update_target_set_level] TO [PolicyAdministratorRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_syspolicy_verify_object_set_identifiers] TO
[PolicyAdministratorRole]
GO
USE [msdb]
GO
Grant SELECT ON [dbo].[syspolicy_conditions] TO [PolicyAdministratorRole]
GO
USE [msdb]
GO
Grant SELECT ON [dbo].[syspolicy_configuration] TO [PolicyAdministratorRole]
GO
USE [msdb]
GO
Grant SELECT ON [dbo].[syspolicy_object_sets] TO [PolicyAdministratorRole]
GO
USE [msdb]
GO
Grant SELECT ON [dbo].[syspolicy_policies] TO [PolicyAdministratorRole]
GO
USE [msdb]
GO
Grant SELECT ON [dbo].[syspolicy_policy_categories] TO [PolicyAdministratorRole]
GO
USE [msdb]
GO
Grant SELECT ON [dbo].[syspolicy_policy_category_subscriptions] TO
[PolicyAdministratorRole]
GO
USE [msdb]
GO
17. Grant SELECT ON [dbo].[syspolicy_policy_execution_history] TO [PolicyAdministratorRole]
GO
USE [msdb]
GO
Grant SELECT ON [dbo].[syspolicy_policy_execution_history_details] TO
[PolicyAdministratorRole]
GO
USE [msdb]
GO
Grant SELECT ON [dbo].[syspolicy_system_health_state] TO [PolicyAdministratorRole]
GO
USE [msdb]
GO
Grant SELECT ON [dbo].[syspolicy_target_set_levels] TO [PolicyAdministratorRole]
GO
USE [msdb]
GO
Grant SELECT ON [dbo].[syspolicy_target_sets] TO [PolicyAdministratorRole]
GO
--Scripting Database Role Members
USE [msdb]
GO
exec sp_addrolemember N'PolicyAdministratorRole', N'##MS_PolicyTsqlExecutionLogin##'
GO
--Create Database Role
USE [msdb]
GO
IF NOT EXISTS (SELECT * FROM sys.database_principals WHERE name = N'SQLAgentOperatorRole'
AND type = 'R')
CREATE ROLE [SQLAgentOperatorRole] AUTHORIZATION [dbo]
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_enum_login_for_proxy] TO [SQLAgentOperatorRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_help_alert] TO [SQLAgentOperatorRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_help_notification] TO [SQLAgentOperatorRole]
GO
18. USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_help_targetserver] TO [SQLAgentOperatorRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_purge_jobhistory] TO [SQLAgentOperatorRole]
GO
USE [msdb]
GO
Grant SELECT ON [dbo].[sysalerts] TO [SQLAgentOperatorRole]
GO
USE [msdb]
GO
Grant SELECT ON [dbo].[sysnotifications] TO [SQLAgentOperatorRole]
GO
USE [msdb]
GO
Grant SELECT ON [dbo].[sysoperators] TO [SQLAgentOperatorRole]
GO
exec sp_addrolemember N'SQLAgentOperatorRole', N'##MS_PolicyTsqlExecutionLogin##'
GO
--Create Database Role
USE [msdb]
GO
IF NOT EXISTS (SELECT * FROM sys.database_principals WHERE name = N'SQLAgentReaderRole'
AND type = 'R')
CREATE ROLE [SQLAgentReaderRole] AUTHORIZATION [dbo]
exec sp_addrolemember N'SQLAgentReaderRole', N'##MS_PolicyTsqlExecutionLogin##'
GO
--Create Database Role
USE [msdb]
GO
IF NOT EXISTS (SELECT * FROM sys.database_principals WHERE name = N'SQLAgentUserRole' AND
type = 'R')
CREATE ROLE [SQLAgentUserRole] AUTHORIZATION [dbo]
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_add_job] TO [SQLAgentUserRole]
GO
19. USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_add_jobschedule] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_add_jobserver] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_add_jobstep] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_add_schedule] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_addtask] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_attach_schedule] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_check_for_owned_jobs] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_check_for_owned_jobsteps] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_delete_job] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_delete_jobschedule] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_delete_jobserver] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_delete_jobstep] TO [SQLAgentUserRole]
20. GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_delete_jobsteplog] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_delete_schedule] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_detach_schedule] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_droptask] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_enum_sqlagent_subsystems] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_get_job_alerts] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_get_jobstep_db_username] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_get_sqlagent_properties] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_help_category] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_help_job] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_help_jobactivity] TO [SQLAgentUserRole]
GO
USE [msdb]
21. GO
Grant EXECUTE ON [dbo].[sp_help_jobcount] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_help_jobhistory] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_help_jobhistory_full] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_help_jobhistory_sem] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_help_jobhistory_summary] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_help_jobs_in_schedule] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_help_jobschedule] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_help_jobserver] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_help_jobstep] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_help_jobsteplog] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_help_operator] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_help_proxy] TO [SQLAgentUserRole]
GO
22. USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_help_schedule] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_maintplan_subplans_by_job] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_notify_operator] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_start_job] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_stop_job] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_uniquetaskname] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_update_job] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_update_jobschedule] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_update_jobstep] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_update_schedule] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant SELECT ON [dbo].[syscategories] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
23. Grant SELECT ON [dbo].[sysjobs_view] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant SELECT ON [dbo].[sysschedules_localserver_view] TO [SQLAgentUserRole]
GO
exec sp_addrolemember N'SQLAgentUserRole', N'##MS_PolicyTsqlExecutionLogin##'
GO
--Scripting Object and Statement Permissions
USE [msdb]
GO
Grant CONNECT ON Database::[msdb] TO [##MS_PolicyTsqlExecutionLogin##]
GO
/*********** Permissions Script for WRON023KEYKO Login BUILTINUsers Generated 2011-10-16
16:22:53 ***************/
--Scripting Server Login (password is null) and Default Database
IF NOT EXISTS (SELECT * FROM sys.server_principals WHERE name = N'BUILTINUsers')
BEGIN
CREATE LOGIN [BUILTINUsers] FROM WINDOWS WITH DEFAULT_DATABASE=[master],
DEFAULT_LANGUAGE=[us_english]
END
--Scripting Server Roles
/*********** Permissions Script for WRON023KEYKO Login NT AUTHORITYSYSTEM Generated
2011-10-16 16:22:55 ***************/
--Scripting Server Login (password is null) and Default Database
IF NOT EXISTS (SELECT * FROM sys.server_principals WHERE name = N'NT AUTHORITYSYSTEM')
BEGIN
24. CREATE LOGIN [NT AUTHORITYSYSTEM] FROM WINDOWS WITH DEFAULT_DATABASE=[master],
DEFAULT_LANGUAGE=[us_english]
END
--Scripting Server Roles
exec sp_addsrvrolemember N'NT AUTHORITYSYSTEM', N'sysadmin'
GO
/*********** Permissions Script for WRON023KEYKO Login NT SERVICEMSSQL$KEYKO Generated
2011-10-16 16:22:57 ***************/
--Scripting Server Login (password is null) and Default Database
IF NOT EXISTS (SELECT * FROM sys.server_principals WHERE name = N'NT SERVICEMSSQL$KEYKO')
BEGIN
CREATE LOGIN [NT SERVICEMSSQL$KEYKO] FROM WINDOWS WITH DEFAULT_DATABASE=[master],
DEFAULT_LANGUAGE=[us_english]
END
--Scripting Server Roles
exec sp_addsrvrolemember N'NT SERVICEMSSQL$KEYKO', N'sysadmin'
GO
/*********** Permissions Script for WRON023KEYKO Login sa Generated 2011-10-16 16:22:58
***************/
--Scripting Server Login (password is null) and Default Database
/* For security reasons the login is created disabled and with a random password. */
IF NOT EXISTS (SELECT * FROM sys.server_principals WHERE name = N'sa')
BEGIN
CREATE LOGIN [sa] WITH PASSWORD=N'¶“áqùm“G“·k“j_ÂÈò)[¤ã2
•ÉY_vY
%¹', DEFAULT_DATABASE=[master], DEFAULT_LANGUAGE=[us_english], CHECK_EXPIRATION=OFF,
CHECK_POLICY=ON
EXEC sys.sp_addsrvrolemember @loginame = N'sa', @rolename = N'sysadmin'
ALTER LOGIN [sa] DISABLE
END
--Scripting Server Roles
25. exec sp_addsrvrolemember N'sa', N'sysadmin'
GO
/*********** Permissions Script for WRON023KEYKO Login WRON023KoprowskiT Generated 2011-
10-16 16:23:00 ***************/
--Scripting Server Login (password is null) and Default Database
IF NOT EXISTS (SELECT * FROM sys.server_principals WHERE name = N'WRON023KoprowskiT')
BEGIN
CREATE LOGIN [WRON023KoprowskiT] FROM WINDOWS WITH DEFAULT_DATABASE=[master],
DEFAULT_LANGUAGE=[us_english]
END
--Scripting Server Roles
exec sp_addsrvrolemember N'WRON023KoprowskiT', N'sysadmin'
GO
/*********** Permissions Script for WRON023KEYKO Login WRON023SQLSRVAdmin Generated
2011-10-16 16:23:02 ***************/
--Scripting Server Login (password is null) and Default Database
IF NOT EXISTS (SELECT * FROM sys.server_principals WHERE name = N'WRON023SQLSRVAdmin')
BEGIN
CREATE LOGIN [WRON023SQLSRVAdmin] FROM WINDOWS WITH DEFAULT_DATABASE=[master],
DEFAULT_LANGUAGE=[us_english]
END
--Scripting Server Roles
exec sp_addsrvrolemember N'WRON023SQLSRVAdmin', N'sysadmin'
GO
/*********** Permissions Script for WRON023KEYKO Login WRON023SQLSRVReporting Generated
2011-10-16 16:23:04 ***************/
26. --Scripting Server Login (password is null) and Default Database
IF NOT EXISTS (SELECT * FROM sys.server_principals WHERE name =
N'WRON023SQLSRVReporting')
BEGIN
CREATE LOGIN [WRON023SQLSRVReporting] FROM WINDOWS WITH DEFAULT_DATABASE=[master],
DEFAULT_LANGUAGE=[us_english]
END
--Scripting Server Roles
USE [master]
GO
--Grant Database Access
IF NOT EXISTS (SELECT * FROM sys.database_principals WHERE name =
N'WRON023SQLSRVReporting')
CREATE USER [WRON023SQLSRVReporting] FOR LOGIN [WRON023SQLSRVReporting] WITH
DEFAULT_SCHEMA=[WRON023SQLSRVReporting]
--Create Database Role
USE [master]
GO
IF NOT EXISTS (SELECT * FROM sys.database_principals WHERE name = N'RSExecRole' AND type =
'R')
CREATE ROLE [RSExecRole] AUTHORIZATION [dbo]
USE [master]
GO
Grant EXECUTE ON [sys].[xp_sqlagent_enum_jobs] TO [RSExecRole]
GO
USE [master]
GO
Grant EXECUTE ON [sys].[xp_sqlagent_is_starting] TO [RSExecRole]
GO
USE [master]
GO
Grant EXECUTE ON [sys].[xp_sqlagent_notify] TO [RSExecRole]
GO
--Scripting Database Role Members
USE [master]
GO
exec sp_addrolemember N'RSExecRole', N'WRON023SQLSRVReporting'
27. GO
--Scripting Object and Statement Permissions
USE [master]
GO
Grant CONNECT ON Database::[master] TO [WRON023SQLSRVReporting]
GO
USE [msdb]
GO
--Grant Database Access
IF NOT EXISTS (SELECT * FROM sys.database_principals WHERE name =
N'WRON023SQLSRVReporting')
CREATE USER [WRON023SQLSRVReporting] FOR LOGIN [WRON023SQLSRVReporting] WITH
DEFAULT_SCHEMA=[WRON023SQLSRVReporting]
--Create Database Role
USE [msdb]
GO
IF NOT EXISTS (SELECT * FROM sys.database_principals WHERE name = N'RSExecRole' AND type =
'R')
CREATE ROLE [RSExecRole] AUTHORIZATION [dbo]
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_add_category] TO [RSExecRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_add_job] TO [RSExecRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_add_jobschedule] TO [RSExecRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_add_jobserver] TO [RSExecRole]
GO
28. USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_add_jobstep] TO [RSExecRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_delete_job] TO [RSExecRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_help_category] TO [RSExecRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_help_job] TO [RSExecRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_help_jobschedule] TO [RSExecRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_verify_job_identifiers] TO [RSExecRole]
GO
USE [msdb]
GO
Grant SELECT ON [dbo].[syscategories] TO [RSExecRole]
GO
USE [msdb]
GO
Grant SELECT ON [dbo].[sysjobs] TO [RSExecRole]
GO
--Scripting Database Role Members
USE [msdb]
GO
exec sp_addrolemember N'RSExecRole', N'WRON023SQLSRVReporting'
GO
--Create Database Role
USE [msdb]
GO
IF NOT EXISTS (SELECT * FROM sys.database_principals WHERE name = N'SQLAgentOperatorRole'
AND type = 'R')
CREATE ROLE [SQLAgentOperatorRole] AUTHORIZATION [dbo]
29. USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_enum_login_for_proxy] TO [SQLAgentOperatorRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_help_alert] TO [SQLAgentOperatorRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_help_notification] TO [SQLAgentOperatorRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_help_targetserver] TO [SQLAgentOperatorRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_purge_jobhistory] TO [SQLAgentOperatorRole]
GO
USE [msdb]
GO
Grant SELECT ON [dbo].[sysalerts] TO [SQLAgentOperatorRole]
GO
USE [msdb]
GO
Grant SELECT ON [dbo].[sysnotifications] TO [SQLAgentOperatorRole]
GO
USE [msdb]
GO
Grant SELECT ON [dbo].[sysoperators] TO [SQLAgentOperatorRole]
GO
exec sp_addrolemember N'SQLAgentOperatorRole', N'WRON023SQLSRVReporting'
GO
--Create Database Role
USE [msdb]
GO
IF NOT EXISTS (SELECT * FROM sys.database_principals WHERE name = N'SQLAgentReaderRole'
AND type = 'R')
CREATE ROLE [SQLAgentReaderRole] AUTHORIZATION [dbo]
exec sp_addrolemember N'SQLAgentReaderRole', N'WRON023SQLSRVReporting'
30. GO
--Create Database Role
USE [msdb]
GO
IF NOT EXISTS (SELECT * FROM sys.database_principals WHERE name = N'SQLAgentUserRole' AND
type = 'R')
CREATE ROLE [SQLAgentUserRole] AUTHORIZATION [dbo]
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_add_job] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_add_jobschedule] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_add_jobserver] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_add_jobstep] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_add_schedule] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_addtask] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_attach_schedule] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_check_for_owned_jobs] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_check_for_owned_jobsteps] TO [SQLAgentUserRole]
GO
USE [msdb]
31. GO
Grant EXECUTE ON [dbo].[sp_delete_job] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_delete_jobschedule] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_delete_jobserver] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_delete_jobstep] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_delete_jobsteplog] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_delete_schedule] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_detach_schedule] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_droptask] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_enum_sqlagent_subsystems] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_get_job_alerts] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_get_jobstep_db_username] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_get_sqlagent_properties] TO [SQLAgentUserRole]
GO
32. USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_help_category] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_help_job] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_help_jobactivity] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_help_jobcount] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_help_jobhistory] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_help_jobhistory_full] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_help_jobhistory_sem] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_help_jobhistory_summary] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_help_jobs_in_schedule] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_help_jobschedule] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_help_jobserver] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
33. Grant EXECUTE ON [dbo].[sp_help_jobstep] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_help_jobsteplog] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_help_operator] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_help_proxy] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_help_schedule] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_maintplan_subplans_by_job] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_notify_operator] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_start_job] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_stop_job] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_uniquetaskname] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_update_job] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_update_jobschedule] TO [SQLAgentUserRole]
GO
34. USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_update_jobstep] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_update_schedule] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant SELECT ON [dbo].[syscategories] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant SELECT ON [dbo].[sysjobs_view] TO [SQLAgentUserRole]
GO
USE [msdb]
GO
Grant SELECT ON [dbo].[sysschedules_localserver_view] TO [SQLAgentUserRole]
GO
exec sp_addrolemember N'SQLAgentUserRole', N'WRON023SQLSRVReporting'
GO
--Scripting Object and Statement Permissions
USE [msdb]
GO
Grant CONNECT ON Database::[msdb] TO [WRON023SQLSRVReporting]
GO
USE [ReportServer$KEYKO]
GO
--Grant Database Access
IF NOT EXISTS (SELECT * FROM sys.database_principals WHERE name =
N'WRON023SQLSRVReporting')
CREATE USER [WRON023SQLSRVReporting] FOR LOGIN [WRON023SQLSRVReporting] WITH
DEFAULT_SCHEMA=[WRON023SQLSRVReporting]
--Scripting Database Role Members
35. USE [ReportServer$KEYKO]
GO
exec sp_addrolemember N'db_owner', N'WRON023SQLSRVReporting'
GO
--Create Database Role
USE [ReportServer$KEYKO]
GO
IF NOT EXISTS (SELECT * FROM sys.database_principals WHERE name = N'RSExecRole' AND type =
'R')
CREATE ROLE [RSExecRole] AUTHORIZATION [dbo]
USE [ReportServer$KEYKO]
GO
Grant DELETE ON [dbo].[ActiveSubscriptions] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant INSERT ON [dbo].[ActiveSubscriptions] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant REFERENCES ON [dbo].[ActiveSubscriptions] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant SELECT ON [dbo].[ActiveSubscriptions] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant UPDATE ON [dbo].[ActiveSubscriptions] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[AddBatchRecord] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[AddDataSource] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[AddEvent] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
36. GO
Grant EXECUTE ON [dbo].[AddExecutionLogEntry] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[AddHistoryRecord] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[AddModelPerspective] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[AddPersistedStream] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[AddReportSchedule] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[AddReportToCache] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[AddRunningJob] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[AddSubscriptionToBeingDeleted] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[AnnounceOrGetKey] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant DELETE ON [dbo].[Batch] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant INSERT ON [dbo].[Batch] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant REFERENCES ON [dbo].[Batch] TO [RSExecRole]
GO
37. USE [ReportServer$KEYKO]
GO
Grant SELECT ON [dbo].[Batch] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant UPDATE ON [dbo].[Batch] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant DELETE ON [dbo].[CachePolicy] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant INSERT ON [dbo].[CachePolicy] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant REFERENCES ON [dbo].[CachePolicy] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant SELECT ON [dbo].[CachePolicy] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant UPDATE ON [dbo].[CachePolicy] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant DELETE ON [dbo].[Catalog] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant INSERT ON [dbo].[Catalog] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant REFERENCES ON [dbo].[Catalog] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant SELECT ON [dbo].[Catalog] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
38. Grant UPDATE ON [dbo].[Catalog] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[ChangeStateOfDataSource] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[CheckSessionLock] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant DELETE ON [dbo].[ChunkData] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant INSERT ON [dbo].[ChunkData] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant REFERENCES ON [dbo].[ChunkData] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant SELECT ON [dbo].[ChunkData] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant UPDATE ON [dbo].[ChunkData] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant DELETE ON [dbo].[ChunkSegmentMapping] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant INSERT ON [dbo].[ChunkSegmentMapping] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant REFERENCES ON [dbo].[ChunkSegmentMapping] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant SELECT ON [dbo].[ChunkSegmentMapping] TO [RSExecRole]
GO
39. USE [ReportServer$KEYKO]
GO
Grant UPDATE ON [dbo].[ChunkSegmentMapping] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[CleanAllHistories] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[CleanBatchRecords] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[CleanBrokenSnapshots] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[CleanEventRecords] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[CleanExpiredCache] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[CleanExpiredJobs] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[CleanExpiredServerParameters] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[CleanExpiredSessions] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[CleanHistoryForReport] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[CleanNotificationRecords] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[CleanOrphanedPolicies] TO [RSExecRole]
40. GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[CleanOrphanedSnapshots] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[ClearScheduleConsistancyFlags] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[ClearSessionSnapshot] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant DELETE ON [dbo].[ConfigurationInfo] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant INSERT ON [dbo].[ConfigurationInfo] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant REFERENCES ON [dbo].[ConfigurationInfo] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant SELECT ON [dbo].[ConfigurationInfo] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant UPDATE ON [dbo].[ConfigurationInfo] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[CopyChunks] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[CopyChunksOfType] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[CreateCacheUpdateNotifications] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
41. GO
Grant EXECUTE ON [dbo].[CreateChunkAndGetPointer] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[CreateChunkSegment] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[CreateDataDrivenNotification] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[CreateNewActiveSubscription] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[CreateNewSnapshotVersion] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[CreateObject] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[CreateRdlChunk] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[CreateRole] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[CreateSegmentedChunk] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[CreateSession] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[CreateSnapShotNotifications] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[CreateSubscription] TO [RSExecRole]
GO
42. USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[CreateTask] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[CreateTimeBasedSubscriptionNotification] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[CreateTimeBasedSubscriptionSchedule] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant DELETE ON [dbo].[DataSource] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant INSERT ON [dbo].[DataSource] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant REFERENCES ON [dbo].[DataSource] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant SELECT ON [dbo].[DataSource] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant UPDATE ON [dbo].[DataSource] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[DecreaseTransientSnapshotRefcount] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[DeepCopySegment] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[DeleteActiveSubscription] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
43. Grant EXECUTE ON [dbo].[DeleteAllHistoryForReport] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[DeleteAllModelItemPolicies] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[DeleteBatchRecords] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[DeleteDataSources] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[DeleteDrillthroughReports] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[DeleteEncryptedContent] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[DeleteEvent] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[DeleteExpiredPersistedStreams] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[DeleteHistoriesWithNoPolicy] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[DeleteHistoryRecord] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[DeleteKey] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[DeleteModelItemPolicy] TO [RSExecRole]
GO
44. USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[DeleteModelPerspectives] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[DeleteNotification] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[DeleteObject] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[DeleteOneChunk] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[DeletePersistedStream] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[DeletePersistedStreams] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[DeletePolicy] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[DeleteReportSchedule] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[DeleteRole] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[DeleteSnapshotAndChunks] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[DeleteSubscription] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[DeleteTask] TO [RSExecRole]
45. GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[DeleteTimeBasedSubscriptionSchedule] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[DeliveryRemovedInactivateSubscription] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[DereferenceSessionSnapshot] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant DELETE ON [dbo].[Event] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant INSERT ON [dbo].[Event] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant REFERENCES ON [dbo].[Event] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant SELECT ON [dbo].[Event] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant UPDATE ON [dbo].[Event] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant REFERENCES ON [dbo].[ExecutionLog] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant SELECT ON [dbo].[ExecutionLog] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant DELETE ON [dbo].[ExecutionLog_Old] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
46. GO
Grant INSERT ON [dbo].[ExecutionLog_Old] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant REFERENCES ON [dbo].[ExecutionLog_Old] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant SELECT ON [dbo].[ExecutionLog_Old] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant UPDATE ON [dbo].[ExecutionLog_Old] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant REFERENCES ON [dbo].[ExecutionLog2] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant SELECT ON [dbo].[ExecutionLog2] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant DELETE ON [dbo].[ExecutionLogStorage] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant INSERT ON [dbo].[ExecutionLogStorage] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant REFERENCES ON [dbo].[ExecutionLogStorage] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant SELECT ON [dbo].[ExecutionLogStorage] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant UPDATE ON [dbo].[ExecutionLogStorage] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[ExpireExecutionLogEntries] TO [RSExecRole]
GO
47. USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[FindItemsByDataSource] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[FindObjectsByLink] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[FindObjectsNonRecursive] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[FindObjectsRecursive] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[FindParents] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[FlushReportFromCache] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[Get_sqlagent_job_status] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[GetAllConfigurationInfo] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[GetAllProperties] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[GetAnnouncedKey] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[GetAReportsReportAction] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
48. Grant EXECUTE ON [dbo].[GetBatchRecords] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[GetCacheOptions] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[GetCacheSchedule] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[GetChildrenBeforeDelete] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[GetChunkInformation] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[GetChunkPointerAndLength] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[GetCompiledDefinition] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[GetDataSourceForUpgrade] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[GetDatasourceInfoForReencryption] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[GetDataSources] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[GetDBVersion] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[GetDrillthroughReport] TO [RSExecRole]
GO
49. USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[GetDrillthroughReports] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[GetExecutionOptions] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[GetFirstPortionPersistedStream] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[GetIDPairsByLink] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[GetModelDefinition] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[GetModelItemInfo] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[GetModelPerspectives] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[GetModelsAndPerspectives] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[GetMyRunningJobs] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[GetNameById] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[GetNextPortionPersistedStream] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[GetObjectContent] TO [RSExecRole]
50. GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[GetOneConfigurationInfo] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[GetParameters] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[GetPoliciesForRole] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[GetPolicy] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[GetPolicyRoots] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[GetPrincipalID] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[GetReportForExecution] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[GetReportParametersForExecution] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[GetRoles] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[GetSchedulesReports] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[GetServerParameters] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
51. GO
Grant EXECUTE ON [dbo].[GetSessionData] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[GetSnapshotChunks] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[GetSnapshotFromHistory] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[GetSnapshotPromotedInfo] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[GetSnapShotSchedule] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[GetSubscription] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[GetSubscriptionInfoForReencryption] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[GetSubscriptionsForUpgrade] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[GetSystemPolicy] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[GetTaskProperties] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[GetTimeBasedSubscriptionReportAction] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[GetTimeBasedSubscriptionSchedule] TO [RSExecRole]
GO
52. USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[GetUpgradeItems] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[GetUserID] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[GetUserIDByName] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[GetUserIDBySid] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant DELETE ON [dbo].[History] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant INSERT ON [dbo].[History] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant REFERENCES ON [dbo].[History] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant SELECT ON [dbo].[History] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant UPDATE ON [dbo].[History] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[IncreaseTransientSnapshotRefcount] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[InsertUnreferencedSnapshot] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
53. Grant EXECUTE ON [dbo].[InvalidateSubscription] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[IsSegmentedChunk] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant DELETE ON [dbo].[Keys] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant INSERT ON [dbo].[Keys] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant REFERENCES ON [dbo].[Keys] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant SELECT ON [dbo].[Keys] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant UPDATE ON [dbo].[Keys] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[ListHistory] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[ListInfoForReencryption] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[ListInstallations] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[ListRunningJobs] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[ListScheduledReports] TO [RSExecRole]
GO
54. USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[ListSubscriptionIDs] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[ListSubscriptionsUsingDataSource] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[ListTasks] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[ListTasksForMaintenance] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[ListUsedDeliveryProviders] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[LoadForDefinitionCheck] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[LoadForRepublishing] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[LockPersistedStream] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[LockSnapshotForUpgrade] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[MarkSnapshotAsDependentOnUser] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[MigrateExecutionLog] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant DELETE ON [dbo].[ModelDrill] TO [RSExecRole]
55. GO
USE [ReportServer$KEYKO]
GO
Grant INSERT ON [dbo].[ModelDrill] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant REFERENCES ON [dbo].[ModelDrill] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant SELECT ON [dbo].[ModelDrill] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant UPDATE ON [dbo].[ModelDrill] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant DELETE ON [dbo].[ModelPerspective] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant INSERT ON [dbo].[ModelPerspective] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant REFERENCES ON [dbo].[ModelPerspective] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant SELECT ON [dbo].[ModelPerspective] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant UPDATE ON [dbo].[ModelPerspective] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[MoveObject] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant DELETE ON [dbo].[Notifications] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
56. GO
Grant INSERT ON [dbo].[Notifications] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant REFERENCES ON [dbo].[Notifications] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant SELECT ON [dbo].[Notifications] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant UPDATE ON [dbo].[Notifications] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[ObjectExists] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[OpenSegmentedChunk] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant DELETE ON [dbo].[Policies] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant INSERT ON [dbo].[Policies] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant REFERENCES ON [dbo].[Policies] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant SELECT ON [dbo].[Policies] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant UPDATE ON [dbo].[Policies] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant DELETE ON [dbo].[PolicyUserRole] TO [RSExecRole]
GO
57. USE [ReportServer$KEYKO]
GO
Grant INSERT ON [dbo].[PolicyUserRole] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant REFERENCES ON [dbo].[PolicyUserRole] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant SELECT ON [dbo].[PolicyUserRole] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant UPDATE ON [dbo].[PolicyUserRole] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[PromoteSnapshotInfo] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[ReadChunkPortion] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[ReadChunkSegment] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[ReadRoleProperties] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[RebindDataSource] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[RemoveReportFromSession] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[RemoveRunningJob] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
58. Grant EXECUTE ON [dbo].[RemoveSegment] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[RemoveSegmentedMapping] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[RemoveSubscriptionFromBeingDeleted] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant DELETE ON [dbo].[ReportSchedule] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant INSERT ON [dbo].[ReportSchedule] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant REFERENCES ON [dbo].[ReportSchedule] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant SELECT ON [dbo].[ReportSchedule] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant UPDATE ON [dbo].[ReportSchedule] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant DELETE ON [dbo].[Roles] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant INSERT ON [dbo].[Roles] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant REFERENCES ON [dbo].[Roles] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant SELECT ON [dbo].[Roles] TO [RSExecRole]
GO
59. USE [ReportServer$KEYKO]
GO
Grant UPDATE ON [dbo].[Roles] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant DELETE ON [dbo].[RunningJobs] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant INSERT ON [dbo].[RunningJobs] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant REFERENCES ON [dbo].[RunningJobs] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant SELECT ON [dbo].[RunningJobs] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant UPDATE ON [dbo].[RunningJobs] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant DELETE ON [dbo].[Schedule] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant INSERT ON [dbo].[Schedule] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant REFERENCES ON [dbo].[Schedule] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant SELECT ON [dbo].[Schedule] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant UPDATE ON [dbo].[Schedule] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant DELETE ON [dbo].[SecData] TO [RSExecRole]
60. GO
USE [ReportServer$KEYKO]
GO
Grant INSERT ON [dbo].[SecData] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant REFERENCES ON [dbo].[SecData] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant SELECT ON [dbo].[SecData] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant UPDATE ON [dbo].[SecData] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant DELETE ON [dbo].[Segment] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant INSERT ON [dbo].[Segment] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant REFERENCES ON [dbo].[Segment] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant SELECT ON [dbo].[Segment] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant UPDATE ON [dbo].[Segment] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant DELETE ON [dbo].[SegmentedChunk] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant INSERT ON [dbo].[SegmentedChunk] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
61. GO
Grant REFERENCES ON [dbo].[SegmentedChunk] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant SELECT ON [dbo].[SegmentedChunk] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant UPDATE ON [dbo].[SegmentedChunk] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[SetAllProperties] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[SetCacheOptions] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[SetConfigurationInfo] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[SetDrillthroughReports] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[SetExecutionOptions] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[SetHistoryLimit] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[SetKeysForInstallation] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[SetLastModified] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[SetMachineName] TO [RSExecRole]
GO
62. USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[SetModelItemPolicy] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[SetNotificationAttempt] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[SetObjectContent] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[SetParameters] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[SetPersistedStreamError] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[SetPolicy] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[SetReencryptedDatasourceInfo] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[SetReencryptedSubscriptionInfo] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[SetRoleProperties] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[SetSessionCredentials] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[SetSessionData] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
63. Grant EXECUTE ON [dbo].[SetSessionParameters] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[SetSnapshotChunksVersion] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[SetSnapshotProcessingFlags] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[SetSystemPolicy] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[SetUpgradeItemStatus] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[ShallowCopyChunk] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant DELETE ON [dbo].[SnapshotData] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant INSERT ON [dbo].[SnapshotData] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant REFERENCES ON [dbo].[SnapshotData] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant SELECT ON [dbo].[SnapshotData] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant UPDATE ON [dbo].[SnapshotData] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[StoreServerParameters] TO [RSExecRole]
GO
64. USE [ReportServer$KEYKO]
GO
Grant DELETE ON [dbo].[Subscriptions] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant INSERT ON [dbo].[Subscriptions] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant REFERENCES ON [dbo].[Subscriptions] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant SELECT ON [dbo].[Subscriptions] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant UPDATE ON [dbo].[Subscriptions] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant DELETE ON [dbo].[SubscriptionsBeingDeleted] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant INSERT ON [dbo].[SubscriptionsBeingDeleted] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant REFERENCES ON [dbo].[SubscriptionsBeingDeleted] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant SELECT ON [dbo].[SubscriptionsBeingDeleted] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant UPDATE ON [dbo].[SubscriptionsBeingDeleted] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[TempChunkExists] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[UpdateActiveSubscription] TO [RSExecRole]
65. GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[UpdatePolicy] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[UpdatePolicyPrincipal] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[UpdatePolicyRole] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[UpdateRunningJob] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[UpdateScheduleNextRunTime] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[UpdateSnapshot] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[UpdateSnapshotPaginationInfo] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[UpdateSnapshotReferences] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[UpdateSubscription] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[UpdateSubscriptionStatus] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[UpdateTask] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
66. GO
Grant DELETE ON [dbo].[Users] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant INSERT ON [dbo].[Users] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant REFERENCES ON [dbo].[Users] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant SELECT ON [dbo].[Users] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant UPDATE ON [dbo].[Users] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[WriteChunkPortion] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[WriteChunkSegment] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[WriteFirstPortionPersistedStream] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[WriteLockSession] TO [RSExecRole]
GO
USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[WriteNextPortionPersistedStream] TO [RSExecRole]
GO
exec sp_addrolemember N'RSExecRole', N'WRON023SQLSRVReporting'
GO
--Scripting Object and Statement Permissions
67. USE [ReportServer$KEYKO]
GO
Grant CONNECT ON Database::[ReportServer$KEYKO] TO [WRON023SQLSRVReporting]
GO
USE [ReportServer$KEYKOTempDB]
GO
--Grant Database Access
IF NOT EXISTS (SELECT * FROM sys.database_principals WHERE name =
N'WRON023SQLSRVReporting')
CREATE USER [WRON023SQLSRVReporting] FOR LOGIN [WRON023SQLSRVReporting] WITH
DEFAULT_SCHEMA=[WRON023SQLSRVReporting]
--Scripting Database Role Members
USE [ReportServer$KEYKOTempDB]
GO
exec sp_addrolemember N'db_owner', N'WRON023SQLSRVReporting'
GO
--Create Database Role
USE [ReportServer$KEYKOTempDB]
GO
IF NOT EXISTS (SELECT * FROM sys.database_principals WHERE name = N'RSExecRole' AND type =
'R')
CREATE ROLE [RSExecRole] AUTHORIZATION [dbo]
USE [ReportServer$KEYKOTempDB]
GO
Grant DELETE ON [dbo].[ChunkData] TO [RSExecRole]
GO
USE [ReportServer$KEYKOTempDB]
GO
Grant INSERT ON [dbo].[ChunkData] TO [RSExecRole]
GO
USE [ReportServer$KEYKOTempDB]
GO
Grant REFERENCES ON [dbo].[ChunkData] TO [RSExecRole]
GO
USE [ReportServer$KEYKOTempDB]
GO
68. Grant SELECT ON [dbo].[ChunkData] TO [RSExecRole]
GO
USE [ReportServer$KEYKOTempDB]
GO
Grant UPDATE ON [dbo].[ChunkData] TO [RSExecRole]
GO
USE [ReportServer$KEYKOTempDB]
GO
Grant DELETE ON [dbo].[ChunkSegmentMapping] TO [RSExecRole]
GO
USE [ReportServer$KEYKOTempDB]
GO
Grant INSERT ON [dbo].[ChunkSegmentMapping] TO [RSExecRole]
GO
USE [ReportServer$KEYKOTempDB]
GO
Grant REFERENCES ON [dbo].[ChunkSegmentMapping] TO [RSExecRole]
GO
USE [ReportServer$KEYKOTempDB]
GO
Grant SELECT ON [dbo].[ChunkSegmentMapping] TO [RSExecRole]
GO
USE [ReportServer$KEYKOTempDB]
GO
Grant UPDATE ON [dbo].[ChunkSegmentMapping] TO [RSExecRole]
GO
USE [ReportServer$KEYKOTempDB]
GO
Grant DELETE ON [dbo].[ExecutionCache] TO [RSExecRole]
GO
USE [ReportServer$KEYKOTempDB]
GO
Grant INSERT ON [dbo].[ExecutionCache] TO [RSExecRole]
GO
USE [ReportServer$KEYKOTempDB]
GO
Grant REFERENCES ON [dbo].[ExecutionCache] TO [RSExecRole]
GO
USE [ReportServer$KEYKOTempDB]
GO
Grant SELECT ON [dbo].[ExecutionCache] TO [RSExecRole]
GO
USE [ReportServer$KEYKOTempDB]
GO
Grant UPDATE ON [dbo].[ExecutionCache] TO [RSExecRole]
GO
69. USE [ReportServer$KEYKOTempDB]
GO
Grant EXECUTE ON [dbo].[GetDBVersion] TO [RSExecRole]
GO
USE [ReportServer$KEYKOTempDB]
GO
Grant DELETE ON [dbo].[PersistedStream] TO [RSExecRole]
GO
USE [ReportServer$KEYKOTempDB]
GO
Grant INSERT ON [dbo].[PersistedStream] TO [RSExecRole]
GO
USE [ReportServer$KEYKOTempDB]
GO
Grant REFERENCES ON [dbo].[PersistedStream] TO [RSExecRole]
GO
USE [ReportServer$KEYKOTempDB]
GO
Grant SELECT ON [dbo].[PersistedStream] TO [RSExecRole]
GO
USE [ReportServer$KEYKOTempDB]
GO
Grant UPDATE ON [dbo].[PersistedStream] TO [RSExecRole]
GO
USE [ReportServer$KEYKOTempDB]
GO
Grant DELETE ON [dbo].[Segment] TO [RSExecRole]
GO
USE [ReportServer$KEYKOTempDB]
GO
Grant INSERT ON [dbo].[Segment] TO [RSExecRole]
GO
USE [ReportServer$KEYKOTempDB]
GO
Grant REFERENCES ON [dbo].[Segment] TO [RSExecRole]
GO
USE [ReportServer$KEYKOTempDB]
GO
Grant SELECT ON [dbo].[Segment] TO [RSExecRole]
GO
USE [ReportServer$KEYKOTempDB]
GO
Grant UPDATE ON [dbo].[Segment] TO [RSExecRole]
GO
USE [ReportServer$KEYKOTempDB]
GO
Grant DELETE ON [dbo].[SegmentedChunk] TO [RSExecRole]
70. GO
USE [ReportServer$KEYKOTempDB]
GO
Grant INSERT ON [dbo].[SegmentedChunk] TO [RSExecRole]
GO
USE [ReportServer$KEYKOTempDB]
GO
Grant REFERENCES ON [dbo].[SegmentedChunk] TO [RSExecRole]
GO
USE [ReportServer$KEYKOTempDB]
GO
Grant SELECT ON [dbo].[SegmentedChunk] TO [RSExecRole]
GO
USE [ReportServer$KEYKOTempDB]
GO
Grant UPDATE ON [dbo].[SegmentedChunk] TO [RSExecRole]
GO
USE [ReportServer$KEYKOTempDB]
GO
Grant DELETE ON [dbo].[SessionData] TO [RSExecRole]
GO
USE [ReportServer$KEYKOTempDB]
GO
Grant INSERT ON [dbo].[SessionData] TO [RSExecRole]
GO
USE [ReportServer$KEYKOTempDB]
GO
Grant REFERENCES ON [dbo].[SessionData] TO [RSExecRole]
GO
USE [ReportServer$KEYKOTempDB]
GO
Grant SELECT ON [dbo].[SessionData] TO [RSExecRole]
GO
USE [ReportServer$KEYKOTempDB]
GO
Grant UPDATE ON [dbo].[SessionData] TO [RSExecRole]
GO
USE [ReportServer$KEYKOTempDB]
GO
Grant DELETE ON [dbo].[SessionLock] TO [RSExecRole]
GO
USE [ReportServer$KEYKOTempDB]
GO
Grant INSERT ON [dbo].[SessionLock] TO [RSExecRole]
GO
USE [ReportServer$KEYKOTempDB]
71. GO
Grant REFERENCES ON [dbo].[SessionLock] TO [RSExecRole]
GO
USE [ReportServer$KEYKOTempDB]
GO
Grant SELECT ON [dbo].[SessionLock] TO [RSExecRole]
GO
USE [ReportServer$KEYKOTempDB]
GO
Grant UPDATE ON [dbo].[SessionLock] TO [RSExecRole]
GO
USE [ReportServer$KEYKOTempDB]
GO
Grant DELETE ON [dbo].[SnapshotData] TO [RSExecRole]
GO
USE [ReportServer$KEYKOTempDB]
GO
Grant INSERT ON [dbo].[SnapshotData] TO [RSExecRole]
GO
USE [ReportServer$KEYKOTempDB]
GO
Grant REFERENCES ON [dbo].[SnapshotData] TO [RSExecRole]
GO
USE [ReportServer$KEYKOTempDB]
GO
Grant SELECT ON [dbo].[SnapshotData] TO [RSExecRole]
GO
USE [ReportServer$KEYKOTempDB]
GO
Grant UPDATE ON [dbo].[SnapshotData] TO [RSExecRole]
GO
exec sp_addrolemember N'RSExecRole', N'WRON023SQLSRVReporting'
GO
--Scripting Object and Statement Permissions
USE [ReportServer$KEYKOTempDB]
GO
Grant CONNECT ON Database::[ReportServer$KEYKOTempDB] TO [WRON023SQLSRVReporting]
GO
72. /*** WARNING: SQLpermssions is freeware - use it at your own risk. ***/
/*** There are potential security issues with copying logins and permissions ***/
/*** from one SQL Server to another. By using SQLpermissions, you acknowledge ***/
/*** and knowingly accept these risks. It is recommended that users take steps ***/
/*** to thoroughly evaluate the necessity of replicating logins and permissions ***/
/*** before using this tool. Idera shall not be liable for any damages you may ***/
/*** sustain by using this tool, whether direct, indirect, special, incidental ***/
/*** or consequential, even if it has been advised of the possibility of such damages.***/