Permissions script for SQL Permissions

72
/*********** Permissions Script for WRON023\KEYKO 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

description

 

Transcript of Permissions script for SQL Permissions

Page 1: Permissions script for SQL Permissions

/*********** Permissions Script for WRON023\KEYKO 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

Page 2: Permissions script for SQL Permissions

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

Page 3: Permissions script for SQL Permissions

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]

Page 4: Permissions script for SQL Permissions

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

Page 5: Permissions script for SQL Permissions

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

Page 6: Permissions script for SQL Permissions

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

Page 7: Permissions script for SQL Permissions

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

Page 8: Permissions script for SQL Permissions

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]

Page 9: Permissions script for SQL Permissions

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]

Page 10: Permissions script for SQL Permissions

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

Page 11: Permissions script for SQL Permissions

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

Page 12: Permissions script for SQL Permissions

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 WRON023\KEYKO 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

Page 13: Permissions script for SQL Permissions

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

Page 14: Permissions script for SQL Permissions

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]

Page 15: Permissions script for SQL Permissions

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

Page 16: Permissions script for SQL Permissions

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

Page 17: Permissions script for SQL Permissions

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

Page 18: Permissions script for SQL Permissions

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

Page 19: Permissions script for SQL Permissions

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]

Page 20: Permissions script for SQL Permissions

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]

Page 21: Permissions script for SQL Permissions

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

Page 22: Permissions script for SQL Permissions

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

Page 23: Permissions script for SQL Permissions

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 WRON023\KEYKO Login BUILTIN\Users 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'BUILTIN\Users') BEGIN CREATE LOGIN [BUILTIN\Users] FROM WINDOWS WITH DEFAULT_DATABASE=[master], DEFAULT_LANGUAGE=[us_english] END --Scripting Server Roles /*********** Permissions Script for WRON023\KEYKO Login NT AUTHORITY\SYSTEM 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 AUTHORITY\SYSTEM') BEGIN

Page 24: Permissions script for SQL Permissions

CREATE LOGIN [NT AUTHORITY\SYSTEM] FROM WINDOWS WITH DEFAULT_DATABASE=[master], DEFAULT_LANGUAGE=[us_english] END --Scripting Server Roles exec sp_addsrvrolemember N'NT AUTHORITY\SYSTEM', N'sysadmin' GO /*********** Permissions Script for WRON023\KEYKO Login NT SERVICE\MSSQL$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 SERVICE\MSSQL$KEYKO') BEGIN CREATE LOGIN [NT SERVICE\MSSQL$KEYKO] FROM WINDOWS WITH DEFAULT_DATABASE=[master], DEFAULT_LANGUAGE=[us_english] END --Scripting Server Roles exec sp_addsrvrolemember N'NT SERVICE\MSSQL$KEYKO', N'sysadmin' GO /*********** Permissions Script for WRON023\KEYKO 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

Page 25: Permissions script for SQL Permissions

exec sp_addsrvrolemember N'sa', N'sysadmin' GO /*********** Permissions Script for WRON023\KEYKO Login WRON023\KoprowskiT 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'WRON023\KoprowskiT') BEGIN CREATE LOGIN [WRON023\KoprowskiT] FROM WINDOWS WITH DEFAULT_DATABASE=[master], DEFAULT_LANGUAGE=[us_english] END --Scripting Server Roles exec sp_addsrvrolemember N'WRON023\KoprowskiT', N'sysadmin' GO /*********** Permissions Script for WRON023\KEYKO Login WRON023\SQLSRVAdmin 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'WRON023\SQLSRVAdmin') BEGIN CREATE LOGIN [WRON023\SQLSRVAdmin] FROM WINDOWS WITH DEFAULT_DATABASE=[master], DEFAULT_LANGUAGE=[us_english] END --Scripting Server Roles exec sp_addsrvrolemember N'WRON023\SQLSRVAdmin', N'sysadmin' GO /*********** Permissions Script for WRON023\KEYKO Login WRON023\SQLSRVReporting Generated 2011-10-16 16:23:04 ***************/

Page 26: Permissions script for SQL Permissions

--Scripting Server Login (password is null) and Default Database IF NOT EXISTS (SELECT * FROM sys.server_principals WHERE name = N'WRON023\SQLSRVReporting') BEGIN CREATE LOGIN [WRON023\SQLSRVReporting] 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'WRON023\SQLSRVReporting') CREATE USER [WRON023\SQLSRVReporting] FOR LOGIN [WRON023\SQLSRVReporting] WITH DEFAULT_SCHEMA=[WRON023\SQLSRVReporting] --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'WRON023\SQLSRVReporting'

Page 27: Permissions script for SQL Permissions

GO --Scripting Object and Statement Permissions USE [master] GO Grant CONNECT ON Database::[master] TO [WRON023\SQLSRVReporting] GO USE [msdb] GO --Grant Database Access IF NOT EXISTS (SELECT * FROM sys.database_principals WHERE name = N'WRON023\SQLSRVReporting') CREATE USER [WRON023\SQLSRVReporting] FOR LOGIN [WRON023\SQLSRVReporting] WITH DEFAULT_SCHEMA=[WRON023\SQLSRVReporting] --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

Page 28: Permissions script for SQL Permissions

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'WRON023\SQLSRVReporting' 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]

Page 29: Permissions script for SQL Permissions

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'WRON023\SQLSRVReporting' 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'WRON023\SQLSRVReporting'

Page 30: Permissions script for SQL Permissions

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]

Page 31: Permissions script for SQL Permissions

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

Page 32: Permissions script for SQL Permissions

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

Page 33: Permissions script for SQL Permissions

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

Page 34: Permissions script for SQL Permissions

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'WRON023\SQLSRVReporting' GO --Scripting Object and Statement Permissions USE [msdb] GO Grant CONNECT ON Database::[msdb] TO [WRON023\SQLSRVReporting] GO USE [ReportServer$KEYKO] GO --Grant Database Access IF NOT EXISTS (SELECT * FROM sys.database_principals WHERE name = N'WRON023\SQLSRVReporting') CREATE USER [WRON023\SQLSRVReporting] FOR LOGIN [WRON023\SQLSRVReporting] WITH DEFAULT_SCHEMA=[WRON023\SQLSRVReporting] --Scripting Database Role Members

Page 35: Permissions script for SQL Permissions

USE [ReportServer$KEYKO] GO exec sp_addrolemember N'db_owner', N'WRON023\SQLSRVReporting' 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]

Page 36: Permissions script for SQL Permissions

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

Page 37: Permissions script for SQL Permissions

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

Page 38: Permissions script for SQL Permissions

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

Page 39: Permissions script for SQL Permissions

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]

Page 40: Permissions script for SQL Permissions

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]

Page 41: Permissions script for SQL Permissions

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

Page 42: Permissions script for SQL Permissions

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

Page 43: Permissions script for SQL Permissions

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

Page 44: Permissions script for SQL Permissions

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]

Page 45: Permissions script for SQL Permissions

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]

Page 46: Permissions script for SQL Permissions

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

Page 47: Permissions script for SQL Permissions

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

Page 48: Permissions script for SQL Permissions

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

Page 49: Permissions script for SQL Permissions

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]

Page 50: Permissions script for SQL Permissions

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]

Page 51: Permissions script for SQL Permissions

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

Page 52: Permissions script for SQL Permissions

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

Page 53: Permissions script for SQL Permissions

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

Page 54: Permissions script for SQL Permissions

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]

Page 55: Permissions script for SQL Permissions

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]

Page 56: Permissions script for SQL Permissions

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

Page 57: Permissions script for SQL Permissions

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

Page 58: Permissions script for SQL Permissions

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

Page 59: Permissions script for SQL Permissions

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]

Page 60: Permissions script for SQL Permissions

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]

Page 61: Permissions script for SQL Permissions

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

Page 62: Permissions script for SQL Permissions

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

Page 63: Permissions script for SQL Permissions

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

Page 64: Permissions script for SQL Permissions

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]

Page 65: Permissions script for SQL Permissions

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]

Page 66: Permissions script for SQL Permissions

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'WRON023\SQLSRVReporting' GO --Scripting Object and Statement Permissions

Page 67: Permissions script for SQL Permissions

USE [ReportServer$KEYKO] GO Grant CONNECT ON Database::[ReportServer$KEYKO] TO [WRON023\SQLSRVReporting] GO USE [ReportServer$KEYKOTempDB] GO --Grant Database Access IF NOT EXISTS (SELECT * FROM sys.database_principals WHERE name = N'WRON023\SQLSRVReporting') CREATE USER [WRON023\SQLSRVReporting] FOR LOGIN [WRON023\SQLSRVReporting] WITH DEFAULT_SCHEMA=[WRON023\SQLSRVReporting] --Scripting Database Role Members USE [ReportServer$KEYKOTempDB] GO exec sp_addrolemember N'db_owner', N'WRON023\SQLSRVReporting' 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

Page 68: Permissions script for SQL Permissions

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

Page 69: Permissions script for SQL Permissions

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]

Page 70: Permissions script for SQL Permissions

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]

Page 71: Permissions script for SQL Permissions

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'WRON023\SQLSRVReporting' GO --Scripting Object and Statement Permissions USE [ReportServer$KEYKOTempDB] GO Grant CONNECT ON Database::[ReportServer$KEYKOTempDB] TO [WRON023\SQLSRVReporting] GO

Page 72: Permissions script for SQL Permissions

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