--This is a list of permissions required to be granted to a user to use the standalone scheduler maintenance tool on SQL Server.


-- basic grants for login
grant select on [RED_REPOSITORY].dbo.ws_meta to [SCM.EXE USER]
grant insert,update,select on [RED_REPOSITORY].dbo.ws_user_adm to [SCM.EXE USER] -- logs user login
grant select on [RED_REPOSITORY].dbo.ws_meta_tables to [SCM.EXE USER]
grant select on [RED_REPOSITORY].dbo.ws_obj_type to [SCM.EXE USER]
grant select on [RED_REPOSITORY].dbo.ws_meta_names to [SCM.EXE USER]
grant select on [RED_REPOSITORY].dbo.ws_table_attributes to [SCM.EXE USER]
grant select on [RED_REPOSITORY].dbo.ws_obj_group to [SCM.EXE USER]
grant select on [RED_REPOSITORY].dbo.ws_pro_gro_map to [SCM.EXE USER]
grant select on [RED_REPOSITORY].dbo.ws_obj_project to [SCM.EXE USER]
grant select on [RED_REPOSITORY].dbo.ws_dbc_target to [SCM.EXE USER]
grant select on [RED_REPOSITORY].dbo.ws_obj_pro_map to [SCM.EXE USER]
grant select on [RED_REPOSITORY].dbo.ws_obj_object to [SCM.EXE USER]
grant select on [RED_REPOSITORY].dbo.ws_meta_admin to [SCM.EXE USER]
grant select on [RED_REPOSITORY].dbo.ws_dbc_connect to [SCM.EXE USER]
grant select on [RED_REPOSITORY].dbo.ws_dim_tab to [SCM.EXE USER]
grant select on [RED_REPOSITORY].dbo.ws_dim_col to [SCM.EXE USER]


-- permissions to display jobs and tasks
grant select on [RED_REPOSITORY].dbo.ws_wrk_job_log to [SCM.EXE USER]
grant select on [RED_REPOSITORY].dbo.ws_wrk_job_ctrl to [SCM.EXE USER]
grant select on [RED_REPOSITORY].dbo.ws_wrk_job_run to [SCM.EXE USER]

grant select on [RED_REPOSITORY].dbo.ws_wrk_task_log to [SCM.EXE USER]
grant select on [RED_REPOSITORY].dbo.ws_wrk_task_ctrl to [SCM.EXE USER]
grant select on [RED_REPOSITORY].dbo.ws_wrk_task_run to [SCM.EXE USER]

grant select on [RED_REPOSITORY].dbo.ws_wrk_audit_log to [SCM.EXE USER]
grant select on [RED_REPOSITORY].dbo.ws_wrk_error_log to [SCM.EXE USER]

-- show job dependencies
-- add insert/update/delete to allow modification of task dependencies
grant select on [RED_REPOSITORY].dbo.ws_wrk_dependency to [SCM.EXE USER]

-- permissions to show scheduler status
grant select on [RED_REPOSITORY].dbo.ws_wrk_scheduler to [SCM.EXE USER]

-- allows viewing and updating of existing parameters
grant update,select on [RED_REPOSITORY].dbo.dss_parameter to [SCM.EXE USER]

-- permissions for starting on hold jobs
grant update on [RED_REPOSITORY].dbo.ws_wrk_job_ctrl to [SCM.EXE USER]

-- supplementary grants for restarting jobs
grant update on [RED_REPOSITORY].dbo.ws_wrk_job_run to [SCM.EXE USER]
grant update on [RED_REPOSITORY].dbo.ws_wrk_task_run to [SCM.EXE USER]
grant execute on [RED_REPOSITORY].dbo.WsWrkAudit to [SCM.EXE USER]
grant delete,select on [RED_REPOSITORY].dbo.ws_wrk_job_thread to [SCM.EXE USER]

-- permissions to abort running/failed jobs
grant insert on [RED_REPOSITORY].dbo.ws_wrk_job_log to [SCM.EXE USER]
grant delete on [RED_REPOSITORY].dbo.ws_wrk_job_run to [SCM.EXE USER]
grant insert on [RED_REPOSITORY].dbo.ws_wrk_task_log to [SCM.EXE USER]
grant delete on [RED_REPOSITORY].dbo.ws_wrk_task_run to [SCM.EXE USER]