
[dbo].[usd_v_container_jobs]
CREATE view usd_v_container_jobs
( containername, containercomment, container_uuid,
agent_name, agent_type, agent_uuid,
productname, productversion, prodcut_uuid,
object_uuid, task, state,
errorcause, errorparam,
activationtime,
creationtime, completiontime,
userparams, packagetype,
jobname, job_uuid,
"procedure", procedureversion, procedure_uuid)
as
select
JC.name, JC.comment, JC.objectid,
CA.agent_name, CA.agent_type, CA.object_uuid,
RSW.productname, RSW.productversion, RSW.objectid,
APP.objectid, APP.task, APP.status,
APP.errorcause, APP.errorparam,
APP.activationtime,
APP.creationtime, APP.completiontime,
APP.userparams, RSW.packagetype,
ACTIV.jobname, ACTIV.objectid,
ACP.itemname, ACP.itemversion, ACP.objectid
from usd_job_cont JC, usd_link_jc_act LJcAct,
usd_v_agents CA, usd_target T,
usd_applic APP, usd_actproc ACP, usd_rsw RSW, usd_activity ACTIV
where ( CA.agent_type=1 or CA.agent_type=4) and
CA.object_uuid =T.objectid and
T.objectid = APP.target and
JC.objectid = LJcAct.jcont and
LJcAct.activity = ACTIV.objectid and
APP.activity = ACTIV.objectid and
APP.actproc = ACP.objectid and
ACP.rsw = RSW.objectid
GO
GRANT SELECT ON [dbo].[usd_v_container_jobs] TO [ams_group]
GRANT REFERENCES ON [dbo].[usd_v_container_jobs] TO [ca_itrm_group]
GRANT SELECT ON [dbo].[usd_v_container_jobs] TO [ca_itrm_group]
GRANT INSERT ON [dbo].[usd_v_container_jobs] TO [ca_itrm_group]
GRANT DELETE ON [dbo].[usd_v_container_jobs] TO [ca_itrm_group]
GRANT UPDATE ON [dbo].[usd_v_container_jobs] TO [ca_itrm_group]
GRANT SELECT ON [dbo].[usd_v_container_jobs] TO [ca_itrm_group_ams]
GRANT SELECT ON [dbo].[usd_v_container_jobs] TO [upmuser_group]
GO