Permissions script for SQL Permissions
Upcoming SlideShare
Loading in...5
×
 

Permissions script for SQL Permissions

on

  • 715 views

 

Statistics

Views

Total Views
715
Views on SlideShare
715
Embed Views
0

Actions

Likes
0
Downloads
3
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Permissions script for SQL Permissions Permissions script for SQL Permissions Document Transcript

  • /*********** 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##)BEGINCREATE LOGIN [##MS_PolicyEventProcessingLogin##] WITHPASSWORD=NîKîΓN_g“Â_!é@ôz«7_§Oæö½_VˬU#4, DEFAULT_DATABASE=[master],DEFAULT_LANGUAGE=[us_english], CHECK_EXPIRATION=OFF, CHECK_POLICY=ONALTER LOGIN [##MS_PolicyEventProcessingLogin##] DISABLEEND--Scripting Server RolesUSE [master]GO--Grant Database AccessIF 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 PermissionsUSE [master]GOGrant CONNECT ON Database::[master] TO [##MS_PolicyEventProcessingLogin##]GOUSE [master]GOGrant EXECUTE ON [sys].[sp_syspolicy_execute_policy] TO[##MS_PolicyEventProcessingLogin##]GOUSE [msdb]GO
  • --Grant Database AccessIF 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 RoleUSE [msdb]GOIF NOT EXISTS (SELECT * FROM sys.database_principals WHERE name =NPolicyAdministratorRole AND type = R)CREATE ROLE [PolicyAdministratorRole] AUTHORIZATION [dbo]USE [msdb]GOGrant EXECUTE ON [dbo].[sp_syspolicy_add_condition] TO [PolicyAdministratorRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_syspolicy_add_object_set] TO [PolicyAdministratorRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_syspolicy_add_policy] TO [PolicyAdministratorRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_syspolicy_add_policy_category] TO [PolicyAdministratorRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_syspolicy_add_policy_category_subscription] TO[PolicyAdministratorRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_syspolicy_add_target_set] TO [PolicyAdministratorRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_syspolicy_add_target_set_level] TO [PolicyAdministratorRole]GOUSE [msdb]GO
  • Grant EXECUTE ON [dbo].[sp_syspolicy_configure] TO [PolicyAdministratorRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_syspolicy_create_purge_job] TO [PolicyAdministratorRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_syspolicy_delete_condition] TO [PolicyAdministratorRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_syspolicy_delete_object_set] TO [PolicyAdministratorRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_syspolicy_delete_policy] TO [PolicyAdministratorRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_syspolicy_delete_policy_category] TO [PolicyAdministratorRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_syspolicy_delete_policy_category_subscription] TO[PolicyAdministratorRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_syspolicy_dispatch_event] TO [PolicyAdministratorRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_syspolicy_log_policy_execution_detail] TO[PolicyAdministratorRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_syspolicy_log_policy_execution_end] TO[PolicyAdministratorRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_syspolicy_log_policy_execution_start] TO[PolicyAdministratorRole]GOUSE [msdb]
  • GOGrant EXECUTE ON [dbo].[sp_syspolicy_purge_health_state] TO [PolicyAdministratorRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_syspolicy_purge_history] TO [PolicyAdministratorRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_syspolicy_rename_condition] TO [PolicyAdministratorRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_syspolicy_rename_policy] TO [PolicyAdministratorRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_syspolicy_rename_policy_category] TO [PolicyAdministratorRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_syspolicy_repair_policy_automation] TO[PolicyAdministratorRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_syspolicy_set_config_enabled] TO [PolicyAdministratorRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_syspolicy_set_config_history_retention] TO[PolicyAdministratorRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_syspolicy_set_log_on_success] TO [PolicyAdministratorRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_syspolicy_update_condition] TO [PolicyAdministratorRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_syspolicy_update_policy] TO [PolicyAdministratorRole]GOUSE [msdb]GO
  • Grant EXECUTE ON [dbo].[sp_syspolicy_update_policy_category] TO [PolicyAdministratorRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_syspolicy_update_policy_category_subscription] TO[PolicyAdministratorRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_syspolicy_update_target_set] TO [PolicyAdministratorRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_syspolicy_update_target_set_level] TO [PolicyAdministratorRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_syspolicy_verify_object_set_identifiers] TO[PolicyAdministratorRole]GOUSE [msdb]GOGrant SELECT ON [dbo].[syspolicy_conditions] TO [PolicyAdministratorRole]GOUSE [msdb]GOGrant SELECT ON [dbo].[syspolicy_configuration] TO [PolicyAdministratorRole]GOUSE [msdb]GOGrant SELECT ON [dbo].[syspolicy_object_sets] TO [PolicyAdministratorRole]GOUSE [msdb]GOGrant SELECT ON [dbo].[syspolicy_policies] TO [PolicyAdministratorRole]GOUSE [msdb]GOGrant SELECT ON [dbo].[syspolicy_policy_categories] TO [PolicyAdministratorRole]GOUSE [msdb]GOGrant SELECT ON [dbo].[syspolicy_policy_category_subscriptions] TO[PolicyAdministratorRole]GOUSE [msdb]GO
  • Grant SELECT ON [dbo].[syspolicy_policy_execution_history] TO [PolicyAdministratorRole]GOUSE [msdb]GOGrant SELECT ON [dbo].[syspolicy_policy_execution_history_details] TO[PolicyAdministratorRole]GOUSE [msdb]GOGrant SELECT ON [dbo].[syspolicy_system_health_state] TO [PolicyAdministratorRole]GOUSE [msdb]GOGrant SELECT ON [dbo].[syspolicy_target_set_levels] TO [PolicyAdministratorRole]GOUSE [msdb]GOGrant SELECT ON [dbo].[syspolicy_target_sets] TO [PolicyAdministratorRole]GO--Scripting Database Role MembersUSE [msdb]GOexec sp_addrolemember NPolicyAdministratorRole, N##MS_PolicyEventProcessingLogin##GO--Create Database RoleUSE [msdb]GOIF NOT EXISTS (SELECT * FROM sys.database_principals WHERE name = NSQLAgentOperatorRoleAND type = R)CREATE ROLE [SQLAgentOperatorRole] AUTHORIZATION [dbo]USE [msdb]GOGrant EXECUTE ON [dbo].[sp_enum_login_for_proxy] TO [SQLAgentOperatorRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_help_alert] TO [SQLAgentOperatorRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_help_notification] TO [SQLAgentOperatorRole]GO
  • USE [msdb]GOGrant EXECUTE ON [dbo].[sp_help_targetserver] TO [SQLAgentOperatorRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_purge_jobhistory] TO [SQLAgentOperatorRole]GOUSE [msdb]GOGrant SELECT ON [dbo].[sysalerts] TO [SQLAgentOperatorRole]GOUSE [msdb]GOGrant SELECT ON [dbo].[sysnotifications] TO [SQLAgentOperatorRole]GOUSE [msdb]GOGrant SELECT ON [dbo].[sysoperators] TO [SQLAgentOperatorRole]GOexec sp_addrolemember NSQLAgentOperatorRole, N##MS_PolicyEventProcessingLogin##GO--Create Database RoleUSE [msdb]GOIF NOT EXISTS (SELECT * FROM sys.database_principals WHERE name = NSQLAgentReaderRoleAND type = R)CREATE ROLE [SQLAgentReaderRole] AUTHORIZATION [dbo]exec sp_addrolemember NSQLAgentReaderRole, N##MS_PolicyEventProcessingLogin##GO--Create Database RoleUSE [msdb]GOIF NOT EXISTS (SELECT * FROM sys.database_principals WHERE name = NSQLAgentUserRole ANDtype = R)CREATE ROLE [SQLAgentUserRole] AUTHORIZATION [dbo]USE [msdb]GOGrant EXECUTE ON [dbo].[sp_add_job] TO [SQLAgentUserRole]GO
  • USE [msdb]GOGrant EXECUTE ON [dbo].[sp_add_jobschedule] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_add_jobserver] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_add_jobstep] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_add_schedule] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_addtask] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_attach_schedule] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_check_for_owned_jobs] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_check_for_owned_jobsteps] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_delete_job] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_delete_jobschedule] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_delete_jobserver] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_delete_jobstep] TO [SQLAgentUserRole]
  • GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_delete_jobsteplog] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_delete_schedule] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_detach_schedule] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_droptask] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_enum_sqlagent_subsystems] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_get_job_alerts] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_get_jobstep_db_username] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_get_sqlagent_properties] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_help_category] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_help_job] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_help_jobactivity] TO [SQLAgentUserRole]GOUSE [msdb]
  • GOGrant EXECUTE ON [dbo].[sp_help_jobcount] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_help_jobhistory] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_help_jobhistory_full] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_help_jobhistory_sem] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_help_jobhistory_summary] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_help_jobs_in_schedule] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_help_jobschedule] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_help_jobserver] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_help_jobstep] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_help_jobsteplog] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_help_operator] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_help_proxy] TO [SQLAgentUserRole]GO
  • USE [msdb]GOGrant EXECUTE ON [dbo].[sp_help_schedule] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_maintplan_subplans_by_job] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_notify_operator] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_start_job] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_stop_job] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_uniquetaskname] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_update_job] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_update_jobschedule] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_update_jobstep] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_update_schedule] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant SELECT ON [dbo].[syscategories] TO [SQLAgentUserRole]GOUSE [msdb]GO
  • Grant SELECT ON [dbo].[sysjobs_view] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant SELECT ON [dbo].[sysschedules_localserver_view] TO [SQLAgentUserRole]GOexec sp_addrolemember NSQLAgentUserRole, N##MS_PolicyEventProcessingLogin##GO--Scripting Object and Statement PermissionsUSE [msdb]GOGrant CONNECT ON Database::[msdb] TO [##MS_PolicyEventProcessingLogin##]GOUSE [msdb]GOGrant 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##)BEGINCREATE LOGIN [##MS_PolicyTsqlExecutionLogin##] WITH PASSWORD=N_á*³*óÎõÁ·¹%"_G)“¹`&]ç(æØ]þX*0_, DEFAULT_DATABASE=[master], DEFAULT_LANGUAGE=[us_english],CHECK_EXPIRATION=OFF, CHECK_POLICY=ONALTER LOGIN [##MS_PolicyTsqlExecutionLogin##] DISABLEEND--Scripting Server RolesUSE [msdb]GO
  • --Grant Database AccessIF 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 RoleUSE [msdb]GOIF NOT EXISTS (SELECT * FROM sys.database_principals WHERE name =NPolicyAdministratorRole AND type = R)CREATE ROLE [PolicyAdministratorRole] AUTHORIZATION [dbo]USE [msdb]GOGrant EXECUTE ON [dbo].[sp_syspolicy_add_condition] TO [PolicyAdministratorRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_syspolicy_add_object_set] TO [PolicyAdministratorRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_syspolicy_add_policy] TO [PolicyAdministratorRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_syspolicy_add_policy_category] TO [PolicyAdministratorRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_syspolicy_add_policy_category_subscription] TO[PolicyAdministratorRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_syspolicy_add_target_set] TO [PolicyAdministratorRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_syspolicy_add_target_set_level] TO [PolicyAdministratorRole]GOUSE [msdb]GO
  • Grant EXECUTE ON [dbo].[sp_syspolicy_configure] TO [PolicyAdministratorRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_syspolicy_create_purge_job] TO [PolicyAdministratorRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_syspolicy_delete_condition] TO [PolicyAdministratorRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_syspolicy_delete_object_set] TO [PolicyAdministratorRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_syspolicy_delete_policy] TO [PolicyAdministratorRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_syspolicy_delete_policy_category] TO [PolicyAdministratorRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_syspolicy_delete_policy_category_subscription] TO[PolicyAdministratorRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_syspolicy_dispatch_event] TO [PolicyAdministratorRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_syspolicy_log_policy_execution_detail] TO[PolicyAdministratorRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_syspolicy_log_policy_execution_end] TO[PolicyAdministratorRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_syspolicy_log_policy_execution_start] TO[PolicyAdministratorRole]GOUSE [msdb]
  • GOGrant EXECUTE ON [dbo].[sp_syspolicy_purge_health_state] TO [PolicyAdministratorRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_syspolicy_purge_history] TO [PolicyAdministratorRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_syspolicy_rename_condition] TO [PolicyAdministratorRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_syspolicy_rename_policy] TO [PolicyAdministratorRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_syspolicy_rename_policy_category] TO [PolicyAdministratorRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_syspolicy_repair_policy_automation] TO[PolicyAdministratorRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_syspolicy_set_config_enabled] TO [PolicyAdministratorRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_syspolicy_set_config_history_retention] TO[PolicyAdministratorRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_syspolicy_set_log_on_success] TO [PolicyAdministratorRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_syspolicy_update_condition] TO [PolicyAdministratorRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_syspolicy_update_policy] TO [PolicyAdministratorRole]GOUSE [msdb]GO
  • Grant EXECUTE ON [dbo].[sp_syspolicy_update_policy_category] TO [PolicyAdministratorRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_syspolicy_update_policy_category_subscription] TO[PolicyAdministratorRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_syspolicy_update_target_set] TO [PolicyAdministratorRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_syspolicy_update_target_set_level] TO [PolicyAdministratorRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_syspolicy_verify_object_set_identifiers] TO[PolicyAdministratorRole]GOUSE [msdb]GOGrant SELECT ON [dbo].[syspolicy_conditions] TO [PolicyAdministratorRole]GOUSE [msdb]GOGrant SELECT ON [dbo].[syspolicy_configuration] TO [PolicyAdministratorRole]GOUSE [msdb]GOGrant SELECT ON [dbo].[syspolicy_object_sets] TO [PolicyAdministratorRole]GOUSE [msdb]GOGrant SELECT ON [dbo].[syspolicy_policies] TO [PolicyAdministratorRole]GOUSE [msdb]GOGrant SELECT ON [dbo].[syspolicy_policy_categories] TO [PolicyAdministratorRole]GOUSE [msdb]GOGrant SELECT ON [dbo].[syspolicy_policy_category_subscriptions] TO[PolicyAdministratorRole]GOUSE [msdb]GO
  • Grant SELECT ON [dbo].[syspolicy_policy_execution_history] TO [PolicyAdministratorRole]GOUSE [msdb]GOGrant SELECT ON [dbo].[syspolicy_policy_execution_history_details] TO[PolicyAdministratorRole]GOUSE [msdb]GOGrant SELECT ON [dbo].[syspolicy_system_health_state] TO [PolicyAdministratorRole]GOUSE [msdb]GOGrant SELECT ON [dbo].[syspolicy_target_set_levels] TO [PolicyAdministratorRole]GOUSE [msdb]GOGrant SELECT ON [dbo].[syspolicy_target_sets] TO [PolicyAdministratorRole]GO--Scripting Database Role MembersUSE [msdb]GOexec sp_addrolemember NPolicyAdministratorRole, N##MS_PolicyTsqlExecutionLogin##GO--Create Database RoleUSE [msdb]GOIF NOT EXISTS (SELECT * FROM sys.database_principals WHERE name = NSQLAgentOperatorRoleAND type = R)CREATE ROLE [SQLAgentOperatorRole] AUTHORIZATION [dbo]USE [msdb]GOGrant EXECUTE ON [dbo].[sp_enum_login_for_proxy] TO [SQLAgentOperatorRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_help_alert] TO [SQLAgentOperatorRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_help_notification] TO [SQLAgentOperatorRole]GO
  • USE [msdb]GOGrant EXECUTE ON [dbo].[sp_help_targetserver] TO [SQLAgentOperatorRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_purge_jobhistory] TO [SQLAgentOperatorRole]GOUSE [msdb]GOGrant SELECT ON [dbo].[sysalerts] TO [SQLAgentOperatorRole]GOUSE [msdb]GOGrant SELECT ON [dbo].[sysnotifications] TO [SQLAgentOperatorRole]GOUSE [msdb]GOGrant SELECT ON [dbo].[sysoperators] TO [SQLAgentOperatorRole]GOexec sp_addrolemember NSQLAgentOperatorRole, N##MS_PolicyTsqlExecutionLogin##GO--Create Database RoleUSE [msdb]GOIF NOT EXISTS (SELECT * FROM sys.database_principals WHERE name = NSQLAgentReaderRoleAND type = R)CREATE ROLE [SQLAgentReaderRole] AUTHORIZATION [dbo]exec sp_addrolemember NSQLAgentReaderRole, N##MS_PolicyTsqlExecutionLogin##GO--Create Database RoleUSE [msdb]GOIF NOT EXISTS (SELECT * FROM sys.database_principals WHERE name = NSQLAgentUserRole ANDtype = R)CREATE ROLE [SQLAgentUserRole] AUTHORIZATION [dbo]USE [msdb]GOGrant EXECUTE ON [dbo].[sp_add_job] TO [SQLAgentUserRole]GO
  • USE [msdb]GOGrant EXECUTE ON [dbo].[sp_add_jobschedule] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_add_jobserver] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_add_jobstep] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_add_schedule] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_addtask] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_attach_schedule] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_check_for_owned_jobs] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_check_for_owned_jobsteps] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_delete_job] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_delete_jobschedule] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_delete_jobserver] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_delete_jobstep] TO [SQLAgentUserRole]
  • GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_delete_jobsteplog] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_delete_schedule] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_detach_schedule] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_droptask] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_enum_sqlagent_subsystems] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_get_job_alerts] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_get_jobstep_db_username] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_get_sqlagent_properties] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_help_category] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_help_job] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_help_jobactivity] TO [SQLAgentUserRole]GOUSE [msdb]
  • GOGrant EXECUTE ON [dbo].[sp_help_jobcount] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_help_jobhistory] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_help_jobhistory_full] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_help_jobhistory_sem] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_help_jobhistory_summary] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_help_jobs_in_schedule] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_help_jobschedule] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_help_jobserver] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_help_jobstep] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_help_jobsteplog] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_help_operator] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_help_proxy] TO [SQLAgentUserRole]GO
  • USE [msdb]GOGrant EXECUTE ON [dbo].[sp_help_schedule] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_maintplan_subplans_by_job] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_notify_operator] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_start_job] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_stop_job] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_uniquetaskname] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_update_job] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_update_jobschedule] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_update_jobstep] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_update_schedule] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant SELECT ON [dbo].[syscategories] TO [SQLAgentUserRole]GOUSE [msdb]GO
  • Grant SELECT ON [dbo].[sysjobs_view] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant SELECT ON [dbo].[sysschedules_localserver_view] TO [SQLAgentUserRole]GOexec sp_addrolemember NSQLAgentUserRole, N##MS_PolicyTsqlExecutionLogin##GO--Scripting Object and Statement PermissionsUSE [msdb]GOGrant CONNECT ON Database::[msdb] TO [##MS_PolicyTsqlExecutionLogin##]GO/*********** Permissions Script for WRON023KEYKO Login BUILTINUsers Generated 2011-10-1616:22:53 ***************/--Scripting Server Login (password is null) and Default DatabaseIF NOT EXISTS (SELECT * FROM sys.server_principals WHERE name = NBUILTINUsers)BEGINCREATE LOGIN [BUILTINUsers] FROM WINDOWS WITH DEFAULT_DATABASE=[master],DEFAULT_LANGUAGE=[us_english]END--Scripting Server Roles/*********** Permissions Script for WRON023KEYKO Login NT AUTHORITYSYSTEM Generated2011-10-16 16:22:55 ***************/--Scripting Server Login (password is null) and Default DatabaseIF NOT EXISTS (SELECT * FROM sys.server_principals WHERE name = NNT AUTHORITYSYSTEM)BEGIN
  • CREATE LOGIN [NT AUTHORITYSYSTEM] FROM WINDOWS WITH DEFAULT_DATABASE=[master],DEFAULT_LANGUAGE=[us_english]END--Scripting Server Rolesexec sp_addsrvrolemember NNT AUTHORITYSYSTEM, NsysadminGO/*********** Permissions Script for WRON023KEYKO Login NT SERVICEMSSQL$KEYKO Generated2011-10-16 16:22:57 ***************/--Scripting Server Login (password is null) and Default DatabaseIF NOT EXISTS (SELECT * FROM sys.server_principals WHERE name = NNT SERVICEMSSQL$KEYKO)BEGINCREATE LOGIN [NT SERVICEMSSQL$KEYKO] FROM WINDOWS WITH DEFAULT_DATABASE=[master],DEFAULT_LANGUAGE=[us_english]END--Scripting Server Rolesexec sp_addsrvrolemember NNT SERVICEMSSQL$KEYKO, NsysadminGO/*********** 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 = Nsa)BEGINCREATE 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=ONEXEC sys.sp_addsrvrolemember @loginame = Nsa, @rolename = NsysadminALTER LOGIN [sa] DISABLEEND--Scripting Server Roles
  • exec sp_addsrvrolemember Nsa, NsysadminGO/*********** Permissions Script for WRON023KEYKO Login WRON023KoprowskiT Generated 2011-10-16 16:23:00 ***************/--Scripting Server Login (password is null) and Default DatabaseIF NOT EXISTS (SELECT * FROM sys.server_principals WHERE name = NWRON023KoprowskiT)BEGINCREATE LOGIN [WRON023KoprowskiT] FROM WINDOWS WITH DEFAULT_DATABASE=[master],DEFAULT_LANGUAGE=[us_english]END--Scripting Server Rolesexec sp_addsrvrolemember NWRON023KoprowskiT, NsysadminGO/*********** Permissions Script for WRON023KEYKO Login WRON023SQLSRVAdmin Generated2011-10-16 16:23:02 ***************/--Scripting Server Login (password is null) and Default DatabaseIF NOT EXISTS (SELECT * FROM sys.server_principals WHERE name = NWRON023SQLSRVAdmin)BEGINCREATE LOGIN [WRON023SQLSRVAdmin] FROM WINDOWS WITH DEFAULT_DATABASE=[master],DEFAULT_LANGUAGE=[us_english]END--Scripting Server Rolesexec sp_addsrvrolemember NWRON023SQLSRVAdmin, NsysadminGO/*********** Permissions Script for WRON023KEYKO Login WRON023SQLSRVReporting Generated2011-10-16 16:23:04 ***************/
  • --Scripting Server Login (password is null) and Default DatabaseIF NOT EXISTS (SELECT * FROM sys.server_principals WHERE name =NWRON023SQLSRVReporting)BEGINCREATE LOGIN [WRON023SQLSRVReporting] FROM WINDOWS WITH DEFAULT_DATABASE=[master],DEFAULT_LANGUAGE=[us_english]END--Scripting Server RolesUSE [master]GO--Grant Database AccessIF NOT EXISTS (SELECT * FROM sys.database_principals WHERE name =NWRON023SQLSRVReporting)CREATE USER [WRON023SQLSRVReporting] FOR LOGIN [WRON023SQLSRVReporting] WITHDEFAULT_SCHEMA=[WRON023SQLSRVReporting]--Create Database RoleUSE [master]GOIF NOT EXISTS (SELECT * FROM sys.database_principals WHERE name = NRSExecRole AND type =R)CREATE ROLE [RSExecRole] AUTHORIZATION [dbo]USE [master]GOGrant EXECUTE ON [sys].[xp_sqlagent_enum_jobs] TO [RSExecRole]GOUSE [master]GOGrant EXECUTE ON [sys].[xp_sqlagent_is_starting] TO [RSExecRole]GOUSE [master]GOGrant EXECUTE ON [sys].[xp_sqlagent_notify] TO [RSExecRole]GO--Scripting Database Role MembersUSE [master]GOexec sp_addrolemember NRSExecRole, NWRON023SQLSRVReporting
  • GO--Scripting Object and Statement PermissionsUSE [master]GOGrant CONNECT ON Database::[master] TO [WRON023SQLSRVReporting]GOUSE [msdb]GO--Grant Database AccessIF NOT EXISTS (SELECT * FROM sys.database_principals WHERE name =NWRON023SQLSRVReporting)CREATE USER [WRON023SQLSRVReporting] FOR LOGIN [WRON023SQLSRVReporting] WITHDEFAULT_SCHEMA=[WRON023SQLSRVReporting]--Create Database RoleUSE [msdb]GOIF NOT EXISTS (SELECT * FROM sys.database_principals WHERE name = NRSExecRole AND type =R)CREATE ROLE [RSExecRole] AUTHORIZATION [dbo]USE [msdb]GOGrant EXECUTE ON [dbo].[sp_add_category] TO [RSExecRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_add_job] TO [RSExecRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_add_jobschedule] TO [RSExecRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_add_jobserver] TO [RSExecRole]GO
  • USE [msdb]GOGrant EXECUTE ON [dbo].[sp_add_jobstep] TO [RSExecRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_delete_job] TO [RSExecRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_help_category] TO [RSExecRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_help_job] TO [RSExecRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_help_jobschedule] TO [RSExecRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_verify_job_identifiers] TO [RSExecRole]GOUSE [msdb]GOGrant SELECT ON [dbo].[syscategories] TO [RSExecRole]GOUSE [msdb]GOGrant SELECT ON [dbo].[sysjobs] TO [RSExecRole]GO--Scripting Database Role MembersUSE [msdb]GOexec sp_addrolemember NRSExecRole, NWRON023SQLSRVReportingGO--Create Database RoleUSE [msdb]GOIF NOT EXISTS (SELECT * FROM sys.database_principals WHERE name = NSQLAgentOperatorRoleAND type = R)CREATE ROLE [SQLAgentOperatorRole] AUTHORIZATION [dbo]
  • USE [msdb]GOGrant EXECUTE ON [dbo].[sp_enum_login_for_proxy] TO [SQLAgentOperatorRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_help_alert] TO [SQLAgentOperatorRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_help_notification] TO [SQLAgentOperatorRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_help_targetserver] TO [SQLAgentOperatorRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_purge_jobhistory] TO [SQLAgentOperatorRole]GOUSE [msdb]GOGrant SELECT ON [dbo].[sysalerts] TO [SQLAgentOperatorRole]GOUSE [msdb]GOGrant SELECT ON [dbo].[sysnotifications] TO [SQLAgentOperatorRole]GOUSE [msdb]GOGrant SELECT ON [dbo].[sysoperators] TO [SQLAgentOperatorRole]GOexec sp_addrolemember NSQLAgentOperatorRole, NWRON023SQLSRVReportingGO--Create Database RoleUSE [msdb]GOIF NOT EXISTS (SELECT * FROM sys.database_principals WHERE name = NSQLAgentReaderRoleAND type = R)CREATE ROLE [SQLAgentReaderRole] AUTHORIZATION [dbo]exec sp_addrolemember NSQLAgentReaderRole, NWRON023SQLSRVReporting
  • GO--Create Database RoleUSE [msdb]GOIF NOT EXISTS (SELECT * FROM sys.database_principals WHERE name = NSQLAgentUserRole ANDtype = R)CREATE ROLE [SQLAgentUserRole] AUTHORIZATION [dbo]USE [msdb]GOGrant EXECUTE ON [dbo].[sp_add_job] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_add_jobschedule] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_add_jobserver] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_add_jobstep] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_add_schedule] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_addtask] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_attach_schedule] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_check_for_owned_jobs] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_check_for_owned_jobsteps] TO [SQLAgentUserRole]GOUSE [msdb]
  • GOGrant EXECUTE ON [dbo].[sp_delete_job] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_delete_jobschedule] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_delete_jobserver] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_delete_jobstep] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_delete_jobsteplog] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_delete_schedule] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_detach_schedule] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_droptask] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_enum_sqlagent_subsystems] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_get_job_alerts] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_get_jobstep_db_username] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_get_sqlagent_properties] TO [SQLAgentUserRole]GO
  • USE [msdb]GOGrant EXECUTE ON [dbo].[sp_help_category] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_help_job] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_help_jobactivity] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_help_jobcount] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_help_jobhistory] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_help_jobhistory_full] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_help_jobhistory_sem] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_help_jobhistory_summary] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_help_jobs_in_schedule] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_help_jobschedule] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_help_jobserver] TO [SQLAgentUserRole]GOUSE [msdb]GO
  • Grant EXECUTE ON [dbo].[sp_help_jobstep] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_help_jobsteplog] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_help_operator] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_help_proxy] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_help_schedule] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_maintplan_subplans_by_job] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_notify_operator] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_start_job] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_stop_job] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_uniquetaskname] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_update_job] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_update_jobschedule] TO [SQLAgentUserRole]GO
  • USE [msdb]GOGrant EXECUTE ON [dbo].[sp_update_jobstep] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant EXECUTE ON [dbo].[sp_update_schedule] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant SELECT ON [dbo].[syscategories] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant SELECT ON [dbo].[sysjobs_view] TO [SQLAgentUserRole]GOUSE [msdb]GOGrant SELECT ON [dbo].[sysschedules_localserver_view] TO [SQLAgentUserRole]GOexec sp_addrolemember NSQLAgentUserRole, NWRON023SQLSRVReportingGO--Scripting Object and Statement PermissionsUSE [msdb]GOGrant CONNECT ON Database::[msdb] TO [WRON023SQLSRVReporting]GOUSE [ReportServer$KEYKO]GO--Grant Database AccessIF NOT EXISTS (SELECT * FROM sys.database_principals WHERE name =NWRON023SQLSRVReporting)CREATE USER [WRON023SQLSRVReporting] FOR LOGIN [WRON023SQLSRVReporting] WITHDEFAULT_SCHEMA=[WRON023SQLSRVReporting]--Scripting Database Role Members
  • USE [ReportServer$KEYKO]GOexec sp_addrolemember Ndb_owner, NWRON023SQLSRVReportingGO--Create Database RoleUSE [ReportServer$KEYKO]GOIF NOT EXISTS (SELECT * FROM sys.database_principals WHERE name = NRSExecRole AND type =R)CREATE ROLE [RSExecRole] AUTHORIZATION [dbo]USE [ReportServer$KEYKO]GOGrant DELETE ON [dbo].[ActiveSubscriptions] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant INSERT ON [dbo].[ActiveSubscriptions] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant REFERENCES ON [dbo].[ActiveSubscriptions] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant SELECT ON [dbo].[ActiveSubscriptions] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant UPDATE ON [dbo].[ActiveSubscriptions] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[AddBatchRecord] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[AddDataSource] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[AddEvent] TO [RSExecRole]GOUSE [ReportServer$KEYKO]
  • GOGrant EXECUTE ON [dbo].[AddExecutionLogEntry] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[AddHistoryRecord] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[AddModelPerspective] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[AddPersistedStream] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[AddReportSchedule] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[AddReportToCache] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[AddRunningJob] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[AddSubscriptionToBeingDeleted] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[AnnounceOrGetKey] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant DELETE ON [dbo].[Batch] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant INSERT ON [dbo].[Batch] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant REFERENCES ON [dbo].[Batch] TO [RSExecRole]GO
  • USE [ReportServer$KEYKO]GOGrant SELECT ON [dbo].[Batch] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant UPDATE ON [dbo].[Batch] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant DELETE ON [dbo].[CachePolicy] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant INSERT ON [dbo].[CachePolicy] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant REFERENCES ON [dbo].[CachePolicy] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant SELECT ON [dbo].[CachePolicy] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant UPDATE ON [dbo].[CachePolicy] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant DELETE ON [dbo].[Catalog] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant INSERT ON [dbo].[Catalog] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant REFERENCES ON [dbo].[Catalog] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant SELECT ON [dbo].[Catalog] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GO
  • Grant UPDATE ON [dbo].[Catalog] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[ChangeStateOfDataSource] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[CheckSessionLock] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant DELETE ON [dbo].[ChunkData] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant INSERT ON [dbo].[ChunkData] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant REFERENCES ON [dbo].[ChunkData] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant SELECT ON [dbo].[ChunkData] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant UPDATE ON [dbo].[ChunkData] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant DELETE ON [dbo].[ChunkSegmentMapping] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant INSERT ON [dbo].[ChunkSegmentMapping] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant REFERENCES ON [dbo].[ChunkSegmentMapping] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant SELECT ON [dbo].[ChunkSegmentMapping] TO [RSExecRole]GO
  • USE [ReportServer$KEYKO]GOGrant UPDATE ON [dbo].[ChunkSegmentMapping] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[CleanAllHistories] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[CleanBatchRecords] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[CleanBrokenSnapshots] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[CleanEventRecords] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[CleanExpiredCache] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[CleanExpiredJobs] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[CleanExpiredServerParameters] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[CleanExpiredSessions] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[CleanHistoryForReport] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[CleanNotificationRecords] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[CleanOrphanedPolicies] TO [RSExecRole]
  • GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[CleanOrphanedSnapshots] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[ClearScheduleConsistancyFlags] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[ClearSessionSnapshot] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant DELETE ON [dbo].[ConfigurationInfo] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant INSERT ON [dbo].[ConfigurationInfo] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant REFERENCES ON [dbo].[ConfigurationInfo] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant SELECT ON [dbo].[ConfigurationInfo] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant UPDATE ON [dbo].[ConfigurationInfo] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[CopyChunks] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[CopyChunksOfType] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[CreateCacheUpdateNotifications] TO [RSExecRole]GOUSE [ReportServer$KEYKO]
  • GOGrant EXECUTE ON [dbo].[CreateChunkAndGetPointer] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[CreateChunkSegment] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[CreateDataDrivenNotification] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[CreateNewActiveSubscription] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[CreateNewSnapshotVersion] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[CreateObject] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[CreateRdlChunk] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[CreateRole] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[CreateSegmentedChunk] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[CreateSession] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[CreateSnapShotNotifications] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[CreateSubscription] TO [RSExecRole]GO
  • USE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[CreateTask] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[CreateTimeBasedSubscriptionNotification] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[CreateTimeBasedSubscriptionSchedule] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant DELETE ON [dbo].[DataSource] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant INSERT ON [dbo].[DataSource] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant REFERENCES ON [dbo].[DataSource] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant SELECT ON [dbo].[DataSource] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant UPDATE ON [dbo].[DataSource] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[DecreaseTransientSnapshotRefcount] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[DeepCopySegment] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[DeleteActiveSubscription] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GO
  • Grant EXECUTE ON [dbo].[DeleteAllHistoryForReport] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[DeleteAllModelItemPolicies] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[DeleteBatchRecords] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[DeleteDataSources] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[DeleteDrillthroughReports] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[DeleteEncryptedContent] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[DeleteEvent] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[DeleteExpiredPersistedStreams] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[DeleteHistoriesWithNoPolicy] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[DeleteHistoryRecord] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[DeleteKey] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[DeleteModelItemPolicy] TO [RSExecRole]GO
  • USE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[DeleteModelPerspectives] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[DeleteNotification] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[DeleteObject] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[DeleteOneChunk] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[DeletePersistedStream] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[DeletePersistedStreams] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[DeletePolicy] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[DeleteReportSchedule] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[DeleteRole] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[DeleteSnapshotAndChunks] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[DeleteSubscription] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[DeleteTask] TO [RSExecRole]
  • GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[DeleteTimeBasedSubscriptionSchedule] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[DeliveryRemovedInactivateSubscription] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[DereferenceSessionSnapshot] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant DELETE ON [dbo].[Event] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant INSERT ON [dbo].[Event] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant REFERENCES ON [dbo].[Event] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant SELECT ON [dbo].[Event] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant UPDATE ON [dbo].[Event] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant REFERENCES ON [dbo].[ExecutionLog] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant SELECT ON [dbo].[ExecutionLog] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant DELETE ON [dbo].[ExecutionLog_Old] TO [RSExecRole]GOUSE [ReportServer$KEYKO]
  • GOGrant INSERT ON [dbo].[ExecutionLog_Old] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant REFERENCES ON [dbo].[ExecutionLog_Old] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant SELECT ON [dbo].[ExecutionLog_Old] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant UPDATE ON [dbo].[ExecutionLog_Old] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant REFERENCES ON [dbo].[ExecutionLog2] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant SELECT ON [dbo].[ExecutionLog2] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant DELETE ON [dbo].[ExecutionLogStorage] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant INSERT ON [dbo].[ExecutionLogStorage] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant REFERENCES ON [dbo].[ExecutionLogStorage] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant SELECT ON [dbo].[ExecutionLogStorage] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant UPDATE ON [dbo].[ExecutionLogStorage] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[ExpireExecutionLogEntries] TO [RSExecRole]GO
  • USE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[FindItemsByDataSource] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[FindObjectsByLink] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[FindObjectsNonRecursive] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[FindObjectsRecursive] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[FindParents] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[FlushReportFromCache] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[Get_sqlagent_job_status] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[GetAllConfigurationInfo] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[GetAllProperties] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[GetAnnouncedKey] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[GetAReportsReportAction] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GO
  • Grant EXECUTE ON [dbo].[GetBatchRecords] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[GetCacheOptions] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[GetCacheSchedule] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[GetChildrenBeforeDelete] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[GetChunkInformation] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[GetChunkPointerAndLength] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[GetCompiledDefinition] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[GetDataSourceForUpgrade] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[GetDatasourceInfoForReencryption] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[GetDataSources] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[GetDBVersion] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[GetDrillthroughReport] TO [RSExecRole]GO
  • USE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[GetDrillthroughReports] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[GetExecutionOptions] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[GetFirstPortionPersistedStream] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[GetIDPairsByLink] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[GetModelDefinition] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[GetModelItemInfo] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[GetModelPerspectives] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[GetModelsAndPerspectives] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[GetMyRunningJobs] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[GetNameById] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[GetNextPortionPersistedStream] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[GetObjectContent] TO [RSExecRole]
  • GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[GetOneConfigurationInfo] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[GetParameters] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[GetPoliciesForRole] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[GetPolicy] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[GetPolicyRoots] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[GetPrincipalID] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[GetReportForExecution] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[GetReportParametersForExecution] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[GetRoles] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[GetSchedulesReports] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[GetServerParameters] TO [RSExecRole]GOUSE [ReportServer$KEYKO]
  • GOGrant EXECUTE ON [dbo].[GetSessionData] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[GetSnapshotChunks] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[GetSnapshotFromHistory] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[GetSnapshotPromotedInfo] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[GetSnapShotSchedule] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[GetSubscription] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[GetSubscriptionInfoForReencryption] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[GetSubscriptionsForUpgrade] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[GetSystemPolicy] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[GetTaskProperties] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[GetTimeBasedSubscriptionReportAction] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[GetTimeBasedSubscriptionSchedule] TO [RSExecRole]GO
  • USE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[GetUpgradeItems] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[GetUserID] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[GetUserIDByName] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[GetUserIDBySid] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant DELETE ON [dbo].[History] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant INSERT ON [dbo].[History] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant REFERENCES ON [dbo].[History] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant SELECT ON [dbo].[History] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant UPDATE ON [dbo].[History] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[IncreaseTransientSnapshotRefcount] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[InsertUnreferencedSnapshot] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GO
  • Grant EXECUTE ON [dbo].[InvalidateSubscription] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[IsSegmentedChunk] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant DELETE ON [dbo].[Keys] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant INSERT ON [dbo].[Keys] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant REFERENCES ON [dbo].[Keys] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant SELECT ON [dbo].[Keys] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant UPDATE ON [dbo].[Keys] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[ListHistory] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[ListInfoForReencryption] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[ListInstallations] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[ListRunningJobs] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[ListScheduledReports] TO [RSExecRole]GO
  • USE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[ListSubscriptionIDs] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[ListSubscriptionsUsingDataSource] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[ListTasks] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[ListTasksForMaintenance] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[ListUsedDeliveryProviders] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[LoadForDefinitionCheck] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[LoadForRepublishing] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[LockPersistedStream] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[LockSnapshotForUpgrade] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[MarkSnapshotAsDependentOnUser] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[MigrateExecutionLog] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant DELETE ON [dbo].[ModelDrill] TO [RSExecRole]
  • GOUSE [ReportServer$KEYKO]GOGrant INSERT ON [dbo].[ModelDrill] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant REFERENCES ON [dbo].[ModelDrill] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant SELECT ON [dbo].[ModelDrill] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant UPDATE ON [dbo].[ModelDrill] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant DELETE ON [dbo].[ModelPerspective] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant INSERT ON [dbo].[ModelPerspective] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant REFERENCES ON [dbo].[ModelPerspective] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant SELECT ON [dbo].[ModelPerspective] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant UPDATE ON [dbo].[ModelPerspective] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[MoveObject] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant DELETE ON [dbo].[Notifications] TO [RSExecRole]GOUSE [ReportServer$KEYKO]
  • GOGrant INSERT ON [dbo].[Notifications] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant REFERENCES ON [dbo].[Notifications] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant SELECT ON [dbo].[Notifications] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant UPDATE ON [dbo].[Notifications] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[ObjectExists] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[OpenSegmentedChunk] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant DELETE ON [dbo].[Policies] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant INSERT ON [dbo].[Policies] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant REFERENCES ON [dbo].[Policies] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant SELECT ON [dbo].[Policies] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant UPDATE ON [dbo].[Policies] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant DELETE ON [dbo].[PolicyUserRole] TO [RSExecRole]GO
  • USE [ReportServer$KEYKO]GOGrant INSERT ON [dbo].[PolicyUserRole] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant REFERENCES ON [dbo].[PolicyUserRole] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant SELECT ON [dbo].[PolicyUserRole] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant UPDATE ON [dbo].[PolicyUserRole] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[PromoteSnapshotInfo] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[ReadChunkPortion] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[ReadChunkSegment] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[ReadRoleProperties] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[RebindDataSource] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[RemoveReportFromSession] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[RemoveRunningJob] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GO
  • Grant EXECUTE ON [dbo].[RemoveSegment] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[RemoveSegmentedMapping] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[RemoveSubscriptionFromBeingDeleted] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant DELETE ON [dbo].[ReportSchedule] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant INSERT ON [dbo].[ReportSchedule] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant REFERENCES ON [dbo].[ReportSchedule] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant SELECT ON [dbo].[ReportSchedule] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant UPDATE ON [dbo].[ReportSchedule] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant DELETE ON [dbo].[Roles] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant INSERT ON [dbo].[Roles] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant REFERENCES ON [dbo].[Roles] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant SELECT ON [dbo].[Roles] TO [RSExecRole]GO
  • USE [ReportServer$KEYKO]GOGrant UPDATE ON [dbo].[Roles] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant DELETE ON [dbo].[RunningJobs] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant INSERT ON [dbo].[RunningJobs] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant REFERENCES ON [dbo].[RunningJobs] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant SELECT ON [dbo].[RunningJobs] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant UPDATE ON [dbo].[RunningJobs] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant DELETE ON [dbo].[Schedule] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant INSERT ON [dbo].[Schedule] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant REFERENCES ON [dbo].[Schedule] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant SELECT ON [dbo].[Schedule] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant UPDATE ON [dbo].[Schedule] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant DELETE ON [dbo].[SecData] TO [RSExecRole]
  • GOUSE [ReportServer$KEYKO]GOGrant INSERT ON [dbo].[SecData] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant REFERENCES ON [dbo].[SecData] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant SELECT ON [dbo].[SecData] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant UPDATE ON [dbo].[SecData] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant DELETE ON [dbo].[Segment] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant INSERT ON [dbo].[Segment] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant REFERENCES ON [dbo].[Segment] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant SELECT ON [dbo].[Segment] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant UPDATE ON [dbo].[Segment] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant DELETE ON [dbo].[SegmentedChunk] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant INSERT ON [dbo].[SegmentedChunk] TO [RSExecRole]GOUSE [ReportServer$KEYKO]
  • GOGrant REFERENCES ON [dbo].[SegmentedChunk] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant SELECT ON [dbo].[SegmentedChunk] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant UPDATE ON [dbo].[SegmentedChunk] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[SetAllProperties] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[SetCacheOptions] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[SetConfigurationInfo] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[SetDrillthroughReports] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[SetExecutionOptions] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[SetHistoryLimit] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[SetKeysForInstallation] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[SetLastModified] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[SetMachineName] TO [RSExecRole]GO
  • USE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[SetModelItemPolicy] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[SetNotificationAttempt] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[SetObjectContent] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[SetParameters] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[SetPersistedStreamError] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[SetPolicy] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[SetReencryptedDatasourceInfo] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[SetReencryptedSubscriptionInfo] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[SetRoleProperties] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[SetSessionCredentials] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[SetSessionData] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GO
  • Grant EXECUTE ON [dbo].[SetSessionParameters] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[SetSnapshotChunksVersion] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[SetSnapshotProcessingFlags] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[SetSystemPolicy] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[SetUpgradeItemStatus] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[ShallowCopyChunk] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant DELETE ON [dbo].[SnapshotData] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant INSERT ON [dbo].[SnapshotData] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant REFERENCES ON [dbo].[SnapshotData] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant SELECT ON [dbo].[SnapshotData] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant UPDATE ON [dbo].[SnapshotData] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[StoreServerParameters] TO [RSExecRole]GO
  • USE [ReportServer$KEYKO]GOGrant DELETE ON [dbo].[Subscriptions] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant INSERT ON [dbo].[Subscriptions] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant REFERENCES ON [dbo].[Subscriptions] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant SELECT ON [dbo].[Subscriptions] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant UPDATE ON [dbo].[Subscriptions] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant DELETE ON [dbo].[SubscriptionsBeingDeleted] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant INSERT ON [dbo].[SubscriptionsBeingDeleted] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant REFERENCES ON [dbo].[SubscriptionsBeingDeleted] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant SELECT ON [dbo].[SubscriptionsBeingDeleted] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant UPDATE ON [dbo].[SubscriptionsBeingDeleted] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[TempChunkExists] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[UpdateActiveSubscription] TO [RSExecRole]
  • GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[UpdatePolicy] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[UpdatePolicyPrincipal] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[UpdatePolicyRole] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[UpdateRunningJob] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[UpdateScheduleNextRunTime] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[UpdateSnapshot] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[UpdateSnapshotPaginationInfo] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[UpdateSnapshotReferences] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[UpdateSubscription] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[UpdateSubscriptionStatus] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[UpdateTask] TO [RSExecRole]GOUSE [ReportServer$KEYKO]
  • GOGrant DELETE ON [dbo].[Users] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant INSERT ON [dbo].[Users] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant REFERENCES ON [dbo].[Users] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant SELECT ON [dbo].[Users] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant UPDATE ON [dbo].[Users] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[WriteChunkPortion] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[WriteChunkSegment] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[WriteFirstPortionPersistedStream] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[WriteLockSession] TO [RSExecRole]GOUSE [ReportServer$KEYKO]GOGrant EXECUTE ON [dbo].[WriteNextPortionPersistedStream] TO [RSExecRole]GOexec sp_addrolemember NRSExecRole, NWRON023SQLSRVReportingGO--Scripting Object and Statement Permissions
  • USE [ReportServer$KEYKO]GOGrant CONNECT ON Database::[ReportServer$KEYKO] TO [WRON023SQLSRVReporting]GOUSE [ReportServer$KEYKOTempDB]GO--Grant Database AccessIF NOT EXISTS (SELECT * FROM sys.database_principals WHERE name =NWRON023SQLSRVReporting)CREATE USER [WRON023SQLSRVReporting] FOR LOGIN [WRON023SQLSRVReporting] WITHDEFAULT_SCHEMA=[WRON023SQLSRVReporting]--Scripting Database Role MembersUSE [ReportServer$KEYKOTempDB]GOexec sp_addrolemember Ndb_owner, NWRON023SQLSRVReportingGO--Create Database RoleUSE [ReportServer$KEYKOTempDB]GOIF NOT EXISTS (SELECT * FROM sys.database_principals WHERE name = NRSExecRole AND type =R)CREATE ROLE [RSExecRole] AUTHORIZATION [dbo]USE [ReportServer$KEYKOTempDB]GOGrant DELETE ON [dbo].[ChunkData] TO [RSExecRole]GOUSE [ReportServer$KEYKOTempDB]GOGrant INSERT ON [dbo].[ChunkData] TO [RSExecRole]GOUSE [ReportServer$KEYKOTempDB]GOGrant REFERENCES ON [dbo].[ChunkData] TO [RSExecRole]GOUSE [ReportServer$KEYKOTempDB]GO
  • Grant SELECT ON [dbo].[ChunkData] TO [RSExecRole]GOUSE [ReportServer$KEYKOTempDB]GOGrant UPDATE ON [dbo].[ChunkData] TO [RSExecRole]GOUSE [ReportServer$KEYKOTempDB]GOGrant DELETE ON [dbo].[ChunkSegmentMapping] TO [RSExecRole]GOUSE [ReportServer$KEYKOTempDB]GOGrant INSERT ON [dbo].[ChunkSegmentMapping] TO [RSExecRole]GOUSE [ReportServer$KEYKOTempDB]GOGrant REFERENCES ON [dbo].[ChunkSegmentMapping] TO [RSExecRole]GOUSE [ReportServer$KEYKOTempDB]GOGrant SELECT ON [dbo].[ChunkSegmentMapping] TO [RSExecRole]GOUSE [ReportServer$KEYKOTempDB]GOGrant UPDATE ON [dbo].[ChunkSegmentMapping] TO [RSExecRole]GOUSE [ReportServer$KEYKOTempDB]GOGrant DELETE ON [dbo].[ExecutionCache] TO [RSExecRole]GOUSE [ReportServer$KEYKOTempDB]GOGrant INSERT ON [dbo].[ExecutionCache] TO [RSExecRole]GOUSE [ReportServer$KEYKOTempDB]GOGrant REFERENCES ON [dbo].[ExecutionCache] TO [RSExecRole]GOUSE [ReportServer$KEYKOTempDB]GOGrant SELECT ON [dbo].[ExecutionCache] TO [RSExecRole]GOUSE [ReportServer$KEYKOTempDB]GOGrant UPDATE ON [dbo].[ExecutionCache] TO [RSExecRole]GO
  • USE [ReportServer$KEYKOTempDB]GOGrant EXECUTE ON [dbo].[GetDBVersion] TO [RSExecRole]GOUSE [ReportServer$KEYKOTempDB]GOGrant DELETE ON [dbo].[PersistedStream] TO [RSExecRole]GOUSE [ReportServer$KEYKOTempDB]GOGrant INSERT ON [dbo].[PersistedStream] TO [RSExecRole]GOUSE [ReportServer$KEYKOTempDB]GOGrant REFERENCES ON [dbo].[PersistedStream] TO [RSExecRole]GOUSE [ReportServer$KEYKOTempDB]GOGrant SELECT ON [dbo].[PersistedStream] TO [RSExecRole]GOUSE [ReportServer$KEYKOTempDB]GOGrant UPDATE ON [dbo].[PersistedStream] TO [RSExecRole]GOUSE [ReportServer$KEYKOTempDB]GOGrant DELETE ON [dbo].[Segment] TO [RSExecRole]GOUSE [ReportServer$KEYKOTempDB]GOGrant INSERT ON [dbo].[Segment] TO [RSExecRole]GOUSE [ReportServer$KEYKOTempDB]GOGrant REFERENCES ON [dbo].[Segment] TO [RSExecRole]GOUSE [ReportServer$KEYKOTempDB]GOGrant SELECT ON [dbo].[Segment] TO [RSExecRole]GOUSE [ReportServer$KEYKOTempDB]GOGrant UPDATE ON [dbo].[Segment] TO [RSExecRole]GOUSE [ReportServer$KEYKOTempDB]GOGrant DELETE ON [dbo].[SegmentedChunk] TO [RSExecRole]
  • GOUSE [ReportServer$KEYKOTempDB]GOGrant INSERT ON [dbo].[SegmentedChunk] TO [RSExecRole]GOUSE [ReportServer$KEYKOTempDB]GOGrant REFERENCES ON [dbo].[SegmentedChunk] TO [RSExecRole]GOUSE [ReportServer$KEYKOTempDB]GOGrant SELECT ON [dbo].[SegmentedChunk] TO [RSExecRole]GOUSE [ReportServer$KEYKOTempDB]GOGrant UPDATE ON [dbo].[SegmentedChunk] TO [RSExecRole]GOUSE [ReportServer$KEYKOTempDB]GOGrant DELETE ON [dbo].[SessionData] TO [RSExecRole]GOUSE [ReportServer$KEYKOTempDB]GOGrant INSERT ON [dbo].[SessionData] TO [RSExecRole]GOUSE [ReportServer$KEYKOTempDB]GOGrant REFERENCES ON [dbo].[SessionData] TO [RSExecRole]GOUSE [ReportServer$KEYKOTempDB]GOGrant SELECT ON [dbo].[SessionData] TO [RSExecRole]GOUSE [ReportServer$KEYKOTempDB]GOGrant UPDATE ON [dbo].[SessionData] TO [RSExecRole]GOUSE [ReportServer$KEYKOTempDB]GOGrant DELETE ON [dbo].[SessionLock] TO [RSExecRole]GOUSE [ReportServer$KEYKOTempDB]GOGrant INSERT ON [dbo].[SessionLock] TO [RSExecRole]GOUSE [ReportServer$KEYKOTempDB]
  • GOGrant REFERENCES ON [dbo].[SessionLock] TO [RSExecRole]GOUSE [ReportServer$KEYKOTempDB]GOGrant SELECT ON [dbo].[SessionLock] TO [RSExecRole]GOUSE [ReportServer$KEYKOTempDB]GOGrant UPDATE ON [dbo].[SessionLock] TO [RSExecRole]GOUSE [ReportServer$KEYKOTempDB]GOGrant DELETE ON [dbo].[SnapshotData] TO [RSExecRole]GOUSE [ReportServer$KEYKOTempDB]GOGrant INSERT ON [dbo].[SnapshotData] TO [RSExecRole]GOUSE [ReportServer$KEYKOTempDB]GOGrant REFERENCES ON [dbo].[SnapshotData] TO [RSExecRole]GOUSE [ReportServer$KEYKOTempDB]GOGrant SELECT ON [dbo].[SnapshotData] TO [RSExecRole]GOUSE [ReportServer$KEYKOTempDB]GOGrant UPDATE ON [dbo].[SnapshotData] TO [RSExecRole]GOexec sp_addrolemember NRSExecRole, NWRON023SQLSRVReportingGO--Scripting Object and Statement PermissionsUSE [ReportServer$KEYKOTempDB]GOGrant CONNECT ON Database::[ReportServer$KEYKOTempDB] TO [WRON023SQLSRVReporting]GO
  • /*** 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.***/