SlideShare uma empresa Scribd logo
1 de 72
Baixar para ler offline
/*********** Permissions Script for WRON023KEYKO Login ##MS_PolicyEventProcessingLogin##
Generated 2011-10-16 16:22:45 ***************/


--Scripting Server Login (password is null) and Default Database

/* For security reasons the login is created disabled and with a random password. */
IF NOT EXISTS (SELECT * FROM sys.server_principals WHERE name =
N'##MS_PolicyEventProcessingLogin##')
BEGIN
CREATE LOGIN [##MS_PolicyEventProcessingLogin##] WITH
PASSWORD=N'îK''îΓN_g“Â_!é@ôz«7_§Oæö½_VˬU#4', DEFAULT_DATABASE=[master],
DEFAULT_LANGUAGE=[us_english], CHECK_EXPIRATION=OFF, CHECK_POLICY=ON
ALTER LOGIN [##MS_PolicyEventProcessingLogin##] DISABLE
END


--Scripting Server Roles



USE [master]
GO



--Grant Database Access

IF NOT EXISTS (SELECT * FROM sys.database_principals WHERE name =
N'##MS_PolicyEventProcessingLogin##')
CREATE USER [##MS_PolicyEventProcessingLogin##] FOR LOGIN
[##MS_PolicyEventProcessingLogin##] WITH DEFAULT_SCHEMA=[dbo]




--Scripting Object and Statement Permissions



USE [master]
GO
Grant CONNECT ON Database::[master] TO [##MS_PolicyEventProcessingLogin##]
GO


USE [master]
GO
Grant EXECUTE ON [sys].[sp_syspolicy_execute_policy] TO
[##MS_PolicyEventProcessingLogin##]
GO



USE [msdb]
GO
--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
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]
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
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
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
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
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]
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]
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
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
Grant SELECT ON [dbo].[sysjobs_view] TO [SQLAgentUserRole]
GO

USE [msdb]
GO
Grant SELECT ON [dbo].[sysschedules_localserver_view] TO [SQLAgentUserRole]
GO


exec sp_addrolemember N'SQLAgentUserRole', N'##MS_PolicyEventProcessingLogin##'
GO




--Scripting Object and Statement Permissions



USE [msdb]
GO
Grant CONNECT ON Database::[msdb] TO [##MS_PolicyEventProcessingLogin##]
GO


USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_syspolicy_events_reader] TO [##MS_PolicyEventProcessingLogin##]
GO




/*********** Permissions Script for WRON023KEYKO Login ##MS_PolicyTsqlExecutionLogin##
Generated 2011-10-16 16:22:51 ***************/


--Scripting Server Login (password is null) and Default Database

/* For security reasons the login is created disabled and with a random password. */
IF NOT EXISTS (SELECT * FROM sys.server_principals WHERE name =
N'##MS_PolicyTsqlExecutionLogin##')
BEGIN
CREATE LOGIN [##MS_PolicyTsqlExecutionLogin##] WITH PASSWORD=N'_á*³*óÎõÁ·¹%"_G)
“¹`&]ç(æØ]þX*0_', DEFAULT_DATABASE=[master], DEFAULT_LANGUAGE=[us_english],
CHECK_EXPIRATION=OFF, CHECK_POLICY=ON
ALTER LOGIN [##MS_PolicyTsqlExecutionLogin##] DISABLE
END


--Scripting Server Roles



USE [msdb]
GO
--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
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]
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
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
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
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
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]
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]
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
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
Grant SELECT ON [dbo].[sysjobs_view] TO [SQLAgentUserRole]
GO

USE [msdb]
GO
Grant SELECT ON [dbo].[sysschedules_localserver_view] TO [SQLAgentUserRole]
GO


exec sp_addrolemember N'SQLAgentUserRole', N'##MS_PolicyTsqlExecutionLogin##'
GO




--Scripting Object and Statement Permissions



USE [msdb]
GO
Grant CONNECT ON Database::[msdb] TO [##MS_PolicyTsqlExecutionLogin##]
GO




/*********** Permissions Script for WRON023KEYKO Login BUILTINUsers Generated 2011-10-16
16:22:53 ***************/


--Scripting Server Login (password is null) and Default Database

IF NOT EXISTS (SELECT * FROM sys.server_principals WHERE name = N'BUILTINUsers')
BEGIN
CREATE LOGIN [BUILTINUsers] FROM WINDOWS WITH DEFAULT_DATABASE=[master],
DEFAULT_LANGUAGE=[us_english]
END


--Scripting Server Roles




/*********** Permissions Script for WRON023KEYKO Login NT AUTHORITYSYSTEM Generated
2011-10-16 16:22:55 ***************/


--Scripting Server Login (password is null) and Default Database

IF NOT EXISTS (SELECT * FROM sys.server_principals WHERE name = N'NT AUTHORITYSYSTEM')
BEGIN
CREATE LOGIN [NT AUTHORITYSYSTEM] FROM WINDOWS WITH DEFAULT_DATABASE=[master],
DEFAULT_LANGUAGE=[us_english]
END


--Scripting Server Roles

exec sp_addsrvrolemember N'NT AUTHORITYSYSTEM', N'sysadmin'
GO




/*********** Permissions Script for WRON023KEYKO Login NT SERVICEMSSQL$KEYKO Generated
2011-10-16 16:22:57 ***************/


--Scripting Server Login (password is null) and Default Database

IF NOT EXISTS (SELECT * FROM sys.server_principals WHERE name = N'NT SERVICEMSSQL$KEYKO')
BEGIN
CREATE LOGIN [NT SERVICEMSSQL$KEYKO] FROM WINDOWS WITH DEFAULT_DATABASE=[master],
DEFAULT_LANGUAGE=[us_english]
END


--Scripting Server Roles

exec sp_addsrvrolemember N'NT SERVICEMSSQL$KEYKO', N'sysadmin'
GO




/*********** Permissions Script for WRON023KEYKO Login sa Generated 2011-10-16 16:22:58
***************/


--Scripting Server Login (password is null) and Default Database

/* For security reasons the login is created disabled and with a random password. */
IF NOT EXISTS (SELECT * FROM sys.server_principals WHERE name = N'sa')
BEGIN
CREATE LOGIN [sa] WITH PASSWORD=N'¶“áqùm“G“·k“j_ÂÈò)[¤ã2
•ÉY_vY
%¹', DEFAULT_DATABASE=[master], DEFAULT_LANGUAGE=[us_english], CHECK_EXPIRATION=OFF,
CHECK_POLICY=ON
EXEC sys.sp_addsrvrolemember @loginame = N'sa', @rolename = N'sysadmin'
ALTER LOGIN [sa] DISABLE
END


--Scripting Server Roles
exec sp_addsrvrolemember N'sa', N'sysadmin'
GO




/*********** Permissions Script for WRON023KEYKO Login WRON023KoprowskiT Generated 2011-
10-16 16:23:00 ***************/


--Scripting Server Login (password is null) and Default Database

IF NOT EXISTS (SELECT * FROM sys.server_principals WHERE name = N'WRON023KoprowskiT')
BEGIN
CREATE LOGIN [WRON023KoprowskiT] FROM WINDOWS WITH DEFAULT_DATABASE=[master],
DEFAULT_LANGUAGE=[us_english]
END


--Scripting Server Roles

exec sp_addsrvrolemember N'WRON023KoprowskiT', N'sysadmin'
GO




/*********** Permissions Script for WRON023KEYKO Login WRON023SQLSRVAdmin Generated
2011-10-16 16:23:02 ***************/


--Scripting Server Login (password is null) and Default Database

IF NOT EXISTS (SELECT * FROM sys.server_principals WHERE name = N'WRON023SQLSRVAdmin')
BEGIN
CREATE LOGIN [WRON023SQLSRVAdmin] FROM WINDOWS WITH DEFAULT_DATABASE=[master],
DEFAULT_LANGUAGE=[us_english]
END


--Scripting Server Roles

exec sp_addsrvrolemember N'WRON023SQLSRVAdmin', N'sysadmin'
GO




/*********** Permissions Script for WRON023KEYKO Login WRON023SQLSRVReporting Generated
2011-10-16 16:23:04 ***************/
--Scripting Server Login (password is null) and Default Database

IF NOT EXISTS (SELECT * FROM sys.server_principals WHERE name =
N'WRON023SQLSRVReporting')
BEGIN
CREATE LOGIN [WRON023SQLSRVReporting] FROM WINDOWS WITH DEFAULT_DATABASE=[master],
DEFAULT_LANGUAGE=[us_english]
END


--Scripting Server Roles



USE [master]
GO



--Grant Database Access

IF NOT EXISTS (SELECT * FROM sys.database_principals WHERE name =
N'WRON023SQLSRVReporting')
CREATE USER [WRON023SQLSRVReporting] FOR LOGIN [WRON023SQLSRVReporting] WITH
DEFAULT_SCHEMA=[WRON023SQLSRVReporting]


--Create Database Role

USE [master]
GO
IF NOT EXISTS (SELECT * FROM sys.database_principals WHERE name = N'RSExecRole' AND type =
'R')
CREATE ROLE [RSExecRole] AUTHORIZATION [dbo]


USE [master]
GO
Grant EXECUTE ON [sys].[xp_sqlagent_enum_jobs] TO [RSExecRole]
GO

USE [master]
GO
Grant EXECUTE ON [sys].[xp_sqlagent_is_starting] TO [RSExecRole]
GO

USE [master]
GO
Grant EXECUTE ON [sys].[xp_sqlagent_notify] TO [RSExecRole]
GO


--Scripting Database Role Members

USE [master]
GO

exec sp_addrolemember N'RSExecRole', N'WRON023SQLSRVReporting'
GO




--Scripting Object and Statement Permissions



USE [master]
GO
Grant CONNECT ON Database::[master] TO [WRON023SQLSRVReporting]
GO




USE [msdb]
GO



--Grant Database Access

IF NOT EXISTS (SELECT * FROM sys.database_principals WHERE name =
N'WRON023SQLSRVReporting')
CREATE USER [WRON023SQLSRVReporting] FOR LOGIN [WRON023SQLSRVReporting] WITH
DEFAULT_SCHEMA=[WRON023SQLSRVReporting]


--Create Database Role

USE [msdb]
GO
IF NOT EXISTS (SELECT * FROM sys.database_principals WHERE name = N'RSExecRole' AND type =
'R')
CREATE ROLE [RSExecRole] AUTHORIZATION [dbo]


USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_add_category] TO [RSExecRole]
GO

USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_add_job] TO [RSExecRole]
GO

USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_add_jobschedule] TO [RSExecRole]
GO

USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_add_jobserver] TO [RSExecRole]
GO
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_add_jobstep] TO [RSExecRole]
GO

USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_delete_job] TO [RSExecRole]
GO

USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_help_category] TO [RSExecRole]
GO

USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_help_job] TO [RSExecRole]
GO

USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_help_jobschedule] TO [RSExecRole]
GO

USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_verify_job_identifiers] TO [RSExecRole]
GO

USE [msdb]
GO
Grant SELECT ON [dbo].[syscategories] TO [RSExecRole]
GO

USE [msdb]
GO
Grant SELECT ON [dbo].[sysjobs] TO [RSExecRole]
GO


--Scripting Database Role Members

USE [msdb]
GO

exec sp_addrolemember N'RSExecRole', N'WRON023SQLSRVReporting'
GO


--Create Database Role

USE [msdb]
GO
IF NOT EXISTS (SELECT * FROM sys.database_principals WHERE name = N'SQLAgentOperatorRole'
AND type = 'R')
CREATE ROLE [SQLAgentOperatorRole] AUTHORIZATION [dbo]
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_enum_login_for_proxy] TO [SQLAgentOperatorRole]
GO

USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_help_alert] TO [SQLAgentOperatorRole]
GO

USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_help_notification] TO [SQLAgentOperatorRole]
GO

USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_help_targetserver] TO [SQLAgentOperatorRole]
GO

USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_purge_jobhistory] TO [SQLAgentOperatorRole]
GO

USE [msdb]
GO
Grant SELECT ON [dbo].[sysalerts] TO [SQLAgentOperatorRole]
GO

USE [msdb]
GO
Grant SELECT ON [dbo].[sysnotifications] TO [SQLAgentOperatorRole]
GO

USE [msdb]
GO
Grant SELECT ON [dbo].[sysoperators] TO [SQLAgentOperatorRole]
GO


exec sp_addrolemember N'SQLAgentOperatorRole', N'WRON023SQLSRVReporting'
GO


--Create Database Role

USE [msdb]
GO
IF NOT EXISTS (SELECT * FROM sys.database_principals WHERE name = N'SQLAgentReaderRole'
AND type = 'R')
CREATE ROLE [SQLAgentReaderRole] AUTHORIZATION [dbo]



exec sp_addrolemember N'SQLAgentReaderRole', N'WRON023SQLSRVReporting'
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]
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
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
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
USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_update_jobstep] TO [SQLAgentUserRole]
GO

USE [msdb]
GO
Grant EXECUTE ON [dbo].[sp_update_schedule] TO [SQLAgentUserRole]
GO

USE [msdb]
GO
Grant SELECT ON [dbo].[syscategories] TO [SQLAgentUserRole]
GO

USE [msdb]
GO
Grant SELECT ON [dbo].[sysjobs_view] TO [SQLAgentUserRole]
GO

USE [msdb]
GO
Grant SELECT ON [dbo].[sysschedules_localserver_view] TO [SQLAgentUserRole]
GO


exec sp_addrolemember N'SQLAgentUserRole', N'WRON023SQLSRVReporting'
GO




--Scripting Object and Statement Permissions



USE [msdb]
GO
Grant CONNECT ON Database::[msdb] TO [WRON023SQLSRVReporting]
GO




USE [ReportServer$KEYKO]
GO



--Grant Database Access

IF NOT EXISTS (SELECT * FROM sys.database_principals WHERE name =
N'WRON023SQLSRVReporting')
CREATE USER [WRON023SQLSRVReporting] FOR LOGIN [WRON023SQLSRVReporting] WITH
DEFAULT_SCHEMA=[WRON023SQLSRVReporting]


--Scripting Database Role Members
USE [ReportServer$KEYKO]
GO

exec sp_addrolemember N'db_owner', N'WRON023SQLSRVReporting'
GO


--Create Database Role

USE [ReportServer$KEYKO]
GO
IF NOT EXISTS (SELECT * FROM sys.database_principals WHERE name = N'RSExecRole' AND type =
'R')
CREATE ROLE [RSExecRole] AUTHORIZATION [dbo]


USE [ReportServer$KEYKO]
GO
Grant DELETE ON [dbo].[ActiveSubscriptions] TO [RSExecRole]
GO

USE [ReportServer$KEYKO]
GO
Grant INSERT ON [dbo].[ActiveSubscriptions] TO [RSExecRole]
GO

USE [ReportServer$KEYKO]
GO
Grant REFERENCES ON [dbo].[ActiveSubscriptions] TO [RSExecRole]
GO

USE [ReportServer$KEYKO]
GO
Grant SELECT ON [dbo].[ActiveSubscriptions] TO [RSExecRole]
GO

USE [ReportServer$KEYKO]
GO
Grant UPDATE ON [dbo].[ActiveSubscriptions] TO [RSExecRole]
GO

USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[AddBatchRecord] TO [RSExecRole]
GO

USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[AddDataSource] TO [RSExecRole]
GO

USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[AddEvent] TO [RSExecRole]
GO

USE [ReportServer$KEYKO]
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
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
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
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]
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]
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
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
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
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]
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]
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
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
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
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]
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]
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
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
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
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]
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]
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
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
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
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]
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]
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
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
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
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]
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]
GO
Grant DELETE ON [dbo].[Users] TO [RSExecRole]
GO

USE [ReportServer$KEYKO]
GO
Grant INSERT ON [dbo].[Users] TO [RSExecRole]
GO

USE [ReportServer$KEYKO]
GO
Grant REFERENCES ON [dbo].[Users] TO [RSExecRole]
GO

USE [ReportServer$KEYKO]
GO
Grant SELECT ON [dbo].[Users] TO [RSExecRole]
GO

USE [ReportServer$KEYKO]
GO
Grant UPDATE ON [dbo].[Users] TO [RSExecRole]
GO

USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[WriteChunkPortion] TO [RSExecRole]
GO

USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[WriteChunkSegment] TO [RSExecRole]
GO

USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[WriteFirstPortionPersistedStream] TO [RSExecRole]
GO

USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[WriteLockSession] TO [RSExecRole]
GO

USE [ReportServer$KEYKO]
GO
Grant EXECUTE ON [dbo].[WriteNextPortionPersistedStream] TO [RSExecRole]
GO


exec sp_addrolemember N'RSExecRole', N'WRON023SQLSRVReporting'
GO




--Scripting Object and Statement Permissions
USE [ReportServer$KEYKO]
GO
Grant CONNECT ON Database::[ReportServer$KEYKO] TO [WRON023SQLSRVReporting]
GO




USE [ReportServer$KEYKOTempDB]
GO



--Grant Database Access

IF NOT EXISTS (SELECT * FROM sys.database_principals WHERE name =
N'WRON023SQLSRVReporting')
CREATE USER [WRON023SQLSRVReporting] FOR LOGIN [WRON023SQLSRVReporting] WITH
DEFAULT_SCHEMA=[WRON023SQLSRVReporting]


--Scripting Database Role Members

USE [ReportServer$KEYKOTempDB]
GO

exec sp_addrolemember N'db_owner', N'WRON023SQLSRVReporting'
GO


--Create Database Role

USE [ReportServer$KEYKOTempDB]
GO
IF NOT EXISTS (SELECT * FROM sys.database_principals WHERE name = N'RSExecRole' AND type =
'R')
CREATE ROLE [RSExecRole] AUTHORIZATION [dbo]


USE [ReportServer$KEYKOTempDB]
GO
Grant DELETE ON [dbo].[ChunkData] TO [RSExecRole]
GO

USE [ReportServer$KEYKOTempDB]
GO
Grant INSERT ON [dbo].[ChunkData] TO [RSExecRole]
GO

USE [ReportServer$KEYKOTempDB]
GO
Grant REFERENCES ON [dbo].[ChunkData] TO [RSExecRole]
GO

USE [ReportServer$KEYKOTempDB]
GO
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
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]
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]
GO
Grant REFERENCES ON [dbo].[SessionLock] TO [RSExecRole]
GO

USE [ReportServer$KEYKOTempDB]
GO
Grant SELECT ON [dbo].[SessionLock] TO [RSExecRole]
GO

USE [ReportServer$KEYKOTempDB]
GO
Grant UPDATE ON [dbo].[SessionLock] TO [RSExecRole]
GO

USE [ReportServer$KEYKOTempDB]
GO
Grant DELETE ON [dbo].[SnapshotData] TO [RSExecRole]
GO

USE [ReportServer$KEYKOTempDB]
GO
Grant INSERT ON [dbo].[SnapshotData] TO [RSExecRole]
GO

USE [ReportServer$KEYKOTempDB]
GO
Grant REFERENCES ON [dbo].[SnapshotData] TO [RSExecRole]
GO

USE [ReportServer$KEYKOTempDB]
GO
Grant SELECT ON [dbo].[SnapshotData] TO [RSExecRole]
GO

USE [ReportServer$KEYKOTempDB]
GO
Grant UPDATE ON [dbo].[SnapshotData] TO [RSExecRole]
GO


exec sp_addrolemember N'RSExecRole', N'WRON023SQLSRVReporting'
GO




--Scripting Object and Statement Permissions



USE [ReportServer$KEYKOTempDB]
GO
Grant CONNECT ON Database::[ReportServer$KEYKOTempDB] TO [WRON023SQLSRVReporting]
GO
/***   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.***/

Mais conteúdo relacionado

Mais procurados

[PHP] Zend_Db (Zend Framework)
[PHP] Zend_Db (Zend Framework)[PHP] Zend_Db (Zend Framework)
[PHP] Zend_Db (Zend Framework)Jun Shimizu
 
Managing a shared mysql farm dpc11
Managing a shared mysql farm dpc11Managing a shared mysql farm dpc11
Managing a shared mysql farm dpc11Combell NV
 
Spring Bootの本当の理解ポイント #jjug
Spring Bootの本当の理解ポイント #jjugSpring Bootの本当の理解ポイント #jjug
Spring Bootの本当の理解ポイント #jjugMasatoshi Tada
 
ReactiveだけじゃないSpring 5 & Spring Boot 2新機能解説
ReactiveだけじゃないSpring 5 & Spring Boot 2新機能解説ReactiveだけじゃないSpring 5 & Spring Boot 2新機能解説
ReactiveだけじゃないSpring 5 & Spring Boot 2新機能解説Masatoshi Tada
 
Heroku Waza 2013 Lessons Learned
Heroku Waza 2013 Lessons LearnedHeroku Waza 2013 Lessons Learned
Heroku Waza 2013 Lessons LearnedSimon Bagreev
 
Capturing, Analyzing, and Optimizing your SQL
Capturing, Analyzing, and Optimizing your SQLCapturing, Analyzing, and Optimizing your SQL
Capturing, Analyzing, and Optimizing your SQLPadraig O'Sullivan
 
Cassandra 2.1
Cassandra 2.1Cassandra 2.1
Cassandra 2.1jbellis
 
Optimizing Slow Queries with Indexes and Creativity
Optimizing Slow Queries with Indexes and CreativityOptimizing Slow Queries with Indexes and Creativity
Optimizing Slow Queries with Indexes and CreativityMongoDB
 
MongoDB.local Sydney 2019: Tips and Tricks for Avoiding Common Query Pitfalls
MongoDB.local Sydney 2019: Tips and Tricks for Avoiding Common Query PitfallsMongoDB.local Sydney 2019: Tips and Tricks for Avoiding Common Query Pitfalls
MongoDB.local Sydney 2019: Tips and Tricks for Avoiding Common Query PitfallsMongoDB
 
MongoDB.local Seattle 2019: Tips & Tricks for Avoiding Common Query Pitfalls
MongoDB.local Seattle 2019: Tips & Tricks for Avoiding Common Query PitfallsMongoDB.local Seattle 2019: Tips & Tricks for Avoiding Common Query Pitfalls
MongoDB.local Seattle 2019: Tips & Tricks for Avoiding Common Query PitfallsMongoDB
 
How to win $10m - analysing DOTA2 data in R (Sheffield R Users Group - May)
How to win $10m - analysing DOTA2 data in R (Sheffield R Users Group - May)How to win $10m - analysing DOTA2 data in R (Sheffield R Users Group - May)
How to win $10m - analysing DOTA2 data in R (Sheffield R Users Group - May)Paul Richards
 
Spring Data JPAによるデータアクセス徹底入門 #jsug
Spring Data JPAによるデータアクセス徹底入門 #jsugSpring Data JPAによるデータアクセス徹底入門 #jsug
Spring Data JPAによるデータアクセス徹底入門 #jsugMasatoshi Tada
 
Vol 12 The Name of the Grain
Vol 12 The Name of the GrainVol 12 The Name of the Grain
Vol 12 The Name of the GrainMaria Nunes
 

Mais procurados (20)

[PHP] Zend_Db (Zend Framework)
[PHP] Zend_Db (Zend Framework)[PHP] Zend_Db (Zend Framework)
[PHP] Zend_Db (Zend Framework)
 
Swing database(mysql)
Swing database(mysql)Swing database(mysql)
Swing database(mysql)
 
Quick reference for spark sql
Quick reference for spark sqlQuick reference for spark sql
Quick reference for spark sql
 
Managing a shared mysql farm dpc11
Managing a shared mysql farm dpc11Managing a shared mysql farm dpc11
Managing a shared mysql farm dpc11
 
Spring Bootの本当の理解ポイント #jjug
Spring Bootの本当の理解ポイント #jjugSpring Bootの本当の理解ポイント #jjug
Spring Bootの本当の理解ポイント #jjug
 
ReactiveだけじゃないSpring 5 & Spring Boot 2新機能解説
ReactiveだけじゃないSpring 5 & Spring Boot 2新機能解説ReactiveだけじゃないSpring 5 & Spring Boot 2新機能解説
ReactiveだけじゃないSpring 5 & Spring Boot 2新機能解説
 
MySQL
MySQLMySQL
MySQL
 
Quick reference for hql
Quick reference for hqlQuick reference for hql
Quick reference for hql
 
Heroku Waza 2013 Lessons Learned
Heroku Waza 2013 Lessons LearnedHeroku Waza 2013 Lessons Learned
Heroku Waza 2013 Lessons Learned
 
Capturing, Analyzing, and Optimizing your SQL
Capturing, Analyzing, and Optimizing your SQLCapturing, Analyzing, and Optimizing your SQL
Capturing, Analyzing, and Optimizing your SQL
 
New tags in html5
New tags in html5New tags in html5
New tags in html5
 
HTML5 - Pedro Rosa
HTML5 - Pedro RosaHTML5 - Pedro Rosa
HTML5 - Pedro Rosa
 
XML-RPC vs Psycopg2
XML-RPC vs Psycopg2XML-RPC vs Psycopg2
XML-RPC vs Psycopg2
 
Cassandra 2.1
Cassandra 2.1Cassandra 2.1
Cassandra 2.1
 
Optimizing Slow Queries with Indexes and Creativity
Optimizing Slow Queries with Indexes and CreativityOptimizing Slow Queries with Indexes and Creativity
Optimizing Slow Queries with Indexes and Creativity
 
MongoDB.local Sydney 2019: Tips and Tricks for Avoiding Common Query Pitfalls
MongoDB.local Sydney 2019: Tips and Tricks for Avoiding Common Query PitfallsMongoDB.local Sydney 2019: Tips and Tricks for Avoiding Common Query Pitfalls
MongoDB.local Sydney 2019: Tips and Tricks for Avoiding Common Query Pitfalls
 
MongoDB.local Seattle 2019: Tips & Tricks for Avoiding Common Query Pitfalls
MongoDB.local Seattle 2019: Tips & Tricks for Avoiding Common Query PitfallsMongoDB.local Seattle 2019: Tips & Tricks for Avoiding Common Query Pitfalls
MongoDB.local Seattle 2019: Tips & Tricks for Avoiding Common Query Pitfalls
 
How to win $10m - analysing DOTA2 data in R (Sheffield R Users Group - May)
How to win $10m - analysing DOTA2 data in R (Sheffield R Users Group - May)How to win $10m - analysing DOTA2 data in R (Sheffield R Users Group - May)
How to win $10m - analysing DOTA2 data in R (Sheffield R Users Group - May)
 
Spring Data JPAによるデータアクセス徹底入門 #jsug
Spring Data JPAによるデータアクセス徹底入門 #jsugSpring Data JPAによるデータアクセス徹底入門 #jsug
Spring Data JPAによるデータアクセス徹底入門 #jsug
 
Vol 12 The Name of the Grain
Vol 12 The Name of the GrainVol 12 The Name of the Grain
Vol 12 The Name of the Grain
 

Semelhante a Permissions script for SQL Permissions

DNN Database Tips & Tricks
DNN Database Tips & TricksDNN Database Tips & Tricks
DNN Database Tips & TricksWill Strohl
 
Database Development Replication Security Maintenance Report
Database Development Replication Security Maintenance ReportDatabase Development Replication Security Maintenance Report
Database Development Replication Security Maintenance Reportnyin27
 
MySQL Best Practices - OTN
MySQL Best Practices - OTNMySQL Best Practices - OTN
MySQL Best Practices - OTNRonald Bradford
 
Successful DB migrations with Liquibase
 Successful DB migrations with Liquibase Successful DB migrations with Liquibase
Successful DB migrations with LiquibaseIllia Seleznov
 
Execution plans for mere mortals
Execution plans for mere mortalsExecution plans for mere mortals
Execution plans for mere mortalsMike Lawell
 
MySQL User Group NL - MySQL 8
MySQL User Group NL - MySQL 8MySQL User Group NL - MySQL 8
MySQL User Group NL - MySQL 8Frederic Descamps
 
OSMC 2008 | Monitoring MySQL by Geert Vanderkelen
OSMC 2008 | Monitoring MySQL by Geert VanderkelenOSMC 2008 | Monitoring MySQL by Geert Vanderkelen
OSMC 2008 | Monitoring MySQL by Geert VanderkelenNETWAYS
 
DJ-02-Model-Single.pptx
DJ-02-Model-Single.pptxDJ-02-Model-Single.pptx
DJ-02-Model-Single.pptxjoeveller
 
Sql server ___________session_18(stored procedures)
Sql server  ___________session_18(stored procedures)Sql server  ___________session_18(stored procedures)
Sql server ___________session_18(stored procedures)Ehtisham Ali
 
My sql presentation
My sql presentationMy sql presentation
My sql presentationNikhil Jain
 
Sqladria 2009 SRC
Sqladria 2009 SRCSqladria 2009 SRC
Sqladria 2009 SRCtepsum
 
DBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should Know
DBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should KnowDBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should Know
DBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should KnowAlex Zaballa
 
DBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should Know
DBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should KnowDBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should Know
DBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should KnowAlex Zaballa
 
DBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should Know
DBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should KnowDBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should Know
DBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should KnowAlex Zaballa
 

Semelhante a Permissions script for SQL Permissions (20)

DNN Database Tips & Tricks
DNN Database Tips & TricksDNN Database Tips & Tricks
DNN Database Tips & Tricks
 
Database Development Replication Security Maintenance Report
Database Development Replication Security Maintenance ReportDatabase Development Replication Security Maintenance Report
Database Development Replication Security Maintenance Report
 
Fortress SQL Server
Fortress SQL ServerFortress SQL Server
Fortress SQL Server
 
MySQL Best Practices - OTN
MySQL Best Practices - OTNMySQL Best Practices - OTN
MySQL Best Practices - OTN
 
Successful DB migrations with Liquibase
 Successful DB migrations with Liquibase Successful DB migrations with Liquibase
Successful DB migrations with Liquibase
 
Execution plans for mere mortals
Execution plans for mere mortalsExecution plans for mere mortals
Execution plans for mere mortals
 
Msql
Msql Msql
Msql
 
MySQL 5.1 Replication
MySQL 5.1 ReplicationMySQL 5.1 Replication
MySQL 5.1 Replication
 
MySQL User Group NL - MySQL 8
MySQL User Group NL - MySQL 8MySQL User Group NL - MySQL 8
MySQL User Group NL - MySQL 8
 
Memory Management
Memory ManagementMemory Management
Memory Management
 
OSMC 2008 | Monitoring MySQL by Geert Vanderkelen
OSMC 2008 | Monitoring MySQL by Geert VanderkelenOSMC 2008 | Monitoring MySQL by Geert Vanderkelen
OSMC 2008 | Monitoring MySQL by Geert Vanderkelen
 
Oracle SQL Tuning
Oracle SQL TuningOracle SQL Tuning
Oracle SQL Tuning
 
Procedures
ProceduresProcedures
Procedures
 
DJ-02-Model-Single.pptx
DJ-02-Model-Single.pptxDJ-02-Model-Single.pptx
DJ-02-Model-Single.pptx
 
Sql server ___________session_18(stored procedures)
Sql server  ___________session_18(stored procedures)Sql server  ___________session_18(stored procedures)
Sql server ___________session_18(stored procedures)
 
My sql presentation
My sql presentationMy sql presentation
My sql presentation
 
Sqladria 2009 SRC
Sqladria 2009 SRCSqladria 2009 SRC
Sqladria 2009 SRC
 
DBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should Know
DBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should KnowDBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should Know
DBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should Know
 
DBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should Know
DBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should KnowDBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should Know
DBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should Know
 
DBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should Know
DBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should KnowDBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should Know
DBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should Know
 

Mais de Tobias Koprowski

KoprowskiT_2AMaDisasterJustBeganAD2018
KoprowskiT_2AMaDisasterJustBeganAD2018KoprowskiT_2AMaDisasterJustBeganAD2018
KoprowskiT_2AMaDisasterJustBeganAD2018Tobias Koprowski
 
DataMindsConnect2018_SECDEVOPS
DataMindsConnect2018_SECDEVOPSDataMindsConnect2018_SECDEVOPS
DataMindsConnect2018_SECDEVOPSTobias Koprowski
 
KoprowskiT_SQLDay2016_2AMaDisasterJustBegan
KoprowskiT_SQLDay2016_2AMaDisasterJustBeganKoprowskiT_SQLDay2016_2AMaDisasterJustBegan
KoprowskiT_SQLDay2016_2AMaDisasterJustBeganTobias Koprowski
 
KoprowskiT-Difinify2017-SQL_ServerBackup_In_The_Cloud
KoprowskiT-Difinify2017-SQL_ServerBackup_In_The_CloudKoprowskiT-Difinify2017-SQL_ServerBackup_In_The_Cloud
KoprowskiT-Difinify2017-SQL_ServerBackup_In_The_CloudTobias Koprowski
 
KoprowskiT-Difinify2017-SQL_Security_In_The_Cloud
KoprowskiT-Difinify2017-SQL_Security_In_The_CloudKoprowskiT-Difinify2017-SQL_Security_In_The_Cloud
KoprowskiT-Difinify2017-SQL_Security_In_The_CloudTobias Koprowski
 
KoprowskiT_PASSEastMidsFEB16_2AMaDisasterJustBegan
KoprowskiT_PASSEastMidsFEB16_2AMaDisasterJustBeganKoprowskiT_PASSEastMidsFEB16_2AMaDisasterJustBegan
KoprowskiT_PASSEastMidsFEB16_2AMaDisasterJustBeganTobias Koprowski
 
KoprowskiT_SQLAzureLandingInBelfast
KoprowskiT_SQLAzureLandingInBelfastKoprowskiT_SQLAzureLandingInBelfast
KoprowskiT_SQLAzureLandingInBelfastTobias Koprowski
 
KoprowskiT_SQLSatMoscow_2AMaDisaterJustBegan
KoprowskiT_SQLSatMoscow_2AMaDisaterJustBeganKoprowskiT_SQLSatMoscow_2AMaDisaterJustBegan
KoprowskiT_SQLSatMoscow_2AMaDisaterJustBeganTobias Koprowski
 
KoprowskiT_SQLSatMoscow_WASDforBeginners
KoprowskiT_SQLSatMoscow_WASDforBeginnersKoprowskiT_SQLSatMoscow_WASDforBeginners
KoprowskiT_SQLSatMoscow_WASDforBeginnersTobias Koprowski
 
KoprowskiT_SQLRelayBirmingham_SQLSecurityInTheClouds
KoprowskiT_SQLRelayBirmingham_SQLSecurityInTheCloudsKoprowskiT_SQLRelayBirmingham_SQLSecurityInTheClouds
KoprowskiT_SQLRelayBirmingham_SQLSecurityInTheCloudsTobias Koprowski
 
KoprowskiT_SQLRelayCaerdydd_SQLSecurityInTheClouds
KoprowskiT_SQLRelayCaerdydd_SQLSecurityInTheCloudsKoprowskiT_SQLRelayCaerdydd_SQLSecurityInTheClouds
KoprowskiT_SQLRelayCaerdydd_SQLSecurityInTheCloudsTobias Koprowski
 
KoprowskiT_SQLRelayNottingham_BackupAndRestoreAD2015
KoprowskiT_SQLRelayNottingham_BackupAndRestoreAD2015KoprowskiT_SQLRelayNottingham_BackupAndRestoreAD2015
KoprowskiT_SQLRelayNottingham_BackupAndRestoreAD2015Tobias Koprowski
 
KoprowskiT_SQLSatHolland_SQLServerSecurityInTheCloud
KoprowskiT_SQLSatHolland_SQLServerSecurityInTheCloudKoprowskiT_SQLSatHolland_SQLServerSecurityInTheCloud
KoprowskiT_SQLSatHolland_SQLServerSecurityInTheCloudTobias Koprowski
 
KoprowskiT_SQLSatDenmark_WASDforBeginners
KoprowskiT_SQLSatDenmark_WASDforBeginnersKoprowskiT_SQLSatDenmark_WASDforBeginners
KoprowskiT_SQLSatDenmark_WASDforBeginnersTobias Koprowski
 
KoprowskiT_Session2_SDNEvent_SourceControlForDBA
KoprowskiT_Session2_SDNEvent_SourceControlForDBAKoprowskiT_Session2_SDNEvent_SourceControlForDBA
KoprowskiT_Session2_SDNEvent_SourceControlForDBATobias Koprowski
 
KoprowskiT_session1_SDNEvent_WASDforBeginners
KoprowskiT_session1_SDNEvent_WASDforBeginnersKoprowskiT_session1_SDNEvent_WASDforBeginners
KoprowskiT_session1_SDNEvent_WASDforBeginnersTobias Koprowski
 
KoprowskiT_SQLSaturdayManchester_2AMaDisasterJustbegan
KoprowskiT_SQLSaturdayManchester_2AMaDisasterJustbeganKoprowskiT_SQLSaturdayManchester_2AMaDisasterJustbegan
KoprowskiT_SQLSaturdayManchester_2AMaDisasterJustbeganTobias Koprowski
 
KoprowskiT_SQLSaturday409_MaintenancePlansForBeginners
KoprowskiT_SQLSaturday409_MaintenancePlansForBeginnersKoprowskiT_SQLSaturday409_MaintenancePlansForBeginners
KoprowskiT_SQLSaturday409_MaintenancePlansForBeginnersTobias Koprowski
 
KoprowskiT_SPBizConf_2AMaDisasterJustBegan
KoprowskiT_SPBizConf_2AMaDisasterJustBeganKoprowskiT_SPBizConf_2AMaDisasterJustBegan
KoprowskiT_SPBizConf_2AMaDisasterJustBeganTobias Koprowski
 

Mais de Tobias Koprowski (20)

KoprowskiT_2AMaDisasterJustBeganAD2018
KoprowskiT_2AMaDisasterJustBeganAD2018KoprowskiT_2AMaDisasterJustBeganAD2018
KoprowskiT_2AMaDisasterJustBeganAD2018
 
DataMindsConnect2018_SECDEVOPS
DataMindsConnect2018_SECDEVOPSDataMindsConnect2018_SECDEVOPS
DataMindsConnect2018_SECDEVOPS
 
KoprowskiT_SQLDay2016_2AMaDisasterJustBegan
KoprowskiT_SQLDay2016_2AMaDisasterJustBeganKoprowskiT_SQLDay2016_2AMaDisasterJustBegan
KoprowskiT_SQLDay2016_2AMaDisasterJustBegan
 
KoprowskiT-Difinify2017-SQL_ServerBackup_In_The_Cloud
KoprowskiT-Difinify2017-SQL_ServerBackup_In_The_CloudKoprowskiT-Difinify2017-SQL_ServerBackup_In_The_Cloud
KoprowskiT-Difinify2017-SQL_ServerBackup_In_The_Cloud
 
KoprowskiT-Difinify2017-SQL_Security_In_The_Cloud
KoprowskiT-Difinify2017-SQL_Security_In_The_CloudKoprowskiT-Difinify2017-SQL_Security_In_The_Cloud
KoprowskiT-Difinify2017-SQL_Security_In_The_Cloud
 
KoprowskiT_PASSEastMidsFEB16_2AMaDisasterJustBegan
KoprowskiT_PASSEastMidsFEB16_2AMaDisasterJustBeganKoprowskiT_PASSEastMidsFEB16_2AMaDisasterJustBegan
KoprowskiT_PASSEastMidsFEB16_2AMaDisasterJustBegan
 
KoprowskiT_SQLAzureLandingInBelfast
KoprowskiT_SQLAzureLandingInBelfastKoprowskiT_SQLAzureLandingInBelfast
KoprowskiT_SQLAzureLandingInBelfast
 
KoprowskiT_SQLSatMoscow_2AMaDisaterJustBegan
KoprowskiT_SQLSatMoscow_2AMaDisaterJustBeganKoprowskiT_SQLSatMoscow_2AMaDisaterJustBegan
KoprowskiT_SQLSatMoscow_2AMaDisaterJustBegan
 
KoprowskiT_SQLSatMoscow_WASDforBeginners
KoprowskiT_SQLSatMoscow_WASDforBeginnersKoprowskiT_SQLSatMoscow_WASDforBeginners
KoprowskiT_SQLSatMoscow_WASDforBeginners
 
KoprowskiT_SQLRelayBirmingham_SQLSecurityInTheClouds
KoprowskiT_SQLRelayBirmingham_SQLSecurityInTheCloudsKoprowskiT_SQLRelayBirmingham_SQLSecurityInTheClouds
KoprowskiT_SQLRelayBirmingham_SQLSecurityInTheClouds
 
KoprowskiT_SQLRelayCaerdydd_SQLSecurityInTheClouds
KoprowskiT_SQLRelayCaerdydd_SQLSecurityInTheCloudsKoprowskiT_SQLRelayCaerdydd_SQLSecurityInTheClouds
KoprowskiT_SQLRelayCaerdydd_SQLSecurityInTheClouds
 
KoprowskiT_SQLRelayNottingham_BackupAndRestoreAD2015
KoprowskiT_SQLRelayNottingham_BackupAndRestoreAD2015KoprowskiT_SQLRelayNottingham_BackupAndRestoreAD2015
KoprowskiT_SQLRelayNottingham_BackupAndRestoreAD2015
 
KoprowskiT_SBIPTI_Keynote
KoprowskiT_SBIPTI_KeynoteKoprowskiT_SBIPTI_Keynote
KoprowskiT_SBIPTI_Keynote
 
KoprowskiT_SQLSatHolland_SQLServerSecurityInTheCloud
KoprowskiT_SQLSatHolland_SQLServerSecurityInTheCloudKoprowskiT_SQLSatHolland_SQLServerSecurityInTheCloud
KoprowskiT_SQLSatHolland_SQLServerSecurityInTheCloud
 
KoprowskiT_SQLSatDenmark_WASDforBeginners
KoprowskiT_SQLSatDenmark_WASDforBeginnersKoprowskiT_SQLSatDenmark_WASDforBeginners
KoprowskiT_SQLSatDenmark_WASDforBeginners
 
KoprowskiT_Session2_SDNEvent_SourceControlForDBA
KoprowskiT_Session2_SDNEvent_SourceControlForDBAKoprowskiT_Session2_SDNEvent_SourceControlForDBA
KoprowskiT_Session2_SDNEvent_SourceControlForDBA
 
KoprowskiT_session1_SDNEvent_WASDforBeginners
KoprowskiT_session1_SDNEvent_WASDforBeginnersKoprowskiT_session1_SDNEvent_WASDforBeginners
KoprowskiT_session1_SDNEvent_WASDforBeginners
 
KoprowskiT_SQLSaturdayManchester_2AMaDisasterJustbegan
KoprowskiT_SQLSaturdayManchester_2AMaDisasterJustbeganKoprowskiT_SQLSaturdayManchester_2AMaDisasterJustbegan
KoprowskiT_SQLSaturdayManchester_2AMaDisasterJustbegan
 
KoprowskiT_SQLSaturday409_MaintenancePlansForBeginners
KoprowskiT_SQLSaturday409_MaintenancePlansForBeginnersKoprowskiT_SQLSaturday409_MaintenancePlansForBeginners
KoprowskiT_SQLSaturday409_MaintenancePlansForBeginners
 
KoprowskiT_SPBizConf_2AMaDisasterJustBegan
KoprowskiT_SPBizConf_2AMaDisasterJustBeganKoprowskiT_SPBizConf_2AMaDisasterJustBegan
KoprowskiT_SPBizConf_2AMaDisasterJustBegan
 

Último

Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Pooja Bhuva
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsMebane Rash
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxheathfieldcps1
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentationcamerronhm
 
Plant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptxPlant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptxUmeshTimilsina1
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxCeline George
 
latest AZ-104 Exam Questions and Answers
latest AZ-104 Exam Questions and Answerslatest AZ-104 Exam Questions and Answers
latest AZ-104 Exam Questions and Answersdalebeck957
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and ModificationsMJDuyan
 
Tatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf artsTatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf artsNbelano25
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...pradhanghanshyam7136
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.MaryamAhmad92
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Pooja Bhuva
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfSherif Taha
 
OSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsOSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsSandeep D Chaudhary
 
How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17Celine George
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxPooja Bhuva
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxPooja Bhuva
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17Celine George
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxDr. Sarita Anand
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...Poonam Aher Patil
 

Último (20)

Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
Plant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptxPlant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptx
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptx
 
latest AZ-104 Exam Questions and Answers
latest AZ-104 Exam Questions and Answerslatest AZ-104 Exam Questions and Answers
latest AZ-104 Exam Questions and Answers
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
Tatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf artsTatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf arts
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
OSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsOSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & Systems
 
How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 

Permissions script for SQL Permissions

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