- 论坛徽章:
- 0
|
ASE装了jobscheduler后,可用相关命令完成日常、作业的创建,sp_sjobhelp 这个命令,用exec 可以执行,但是用sp_sjobhelp @name= ,@option= 无法成功。请各位大侠帮确诊一下。
用sp_sjobhelp看一下目前所创建的内容:
1> sp_sjobhelp
2> go
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
(1 row affected)
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
job_id: 4 name: 'dump tran mbis_gj'
description:
owner : job_operator
created : Jun 25 2009 12:42PM
properties : shared
timeout : 60
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
sched_id: 1 name: 'dump_tran_scheduler'
description:
owner : job_operator
created : Jun 26 2009 5:41PM
starttime : 17:36
startdate : 26 Jun 2009
sched_id: 2 name: 'dump_mbss01_tran'
description:
owner : job_operator
created : Jun 30 2009 10:57AM
starttime : 17:36
startdate : 26 Jun 2009
(return status = 0)
用sp_sjobhelp查看报错情况:
1>
2> sp_sjobhelp @name='jname=dump tran mbis_gj', @options='list'
3> go
Msg 102, Level 15, State 1:
Server 'MBSSsec', Line 2:
Incorrect syntax near '='.
1> sp_sjobhelp @name='jname=dump tran mbis_gj', @option='list'
2> go
Msg 156, Level 15, State 2:
Server 'MBSSsec', Line 1:
Incorrect syntax near the keyword 'option'.
直接用exec
1> exec sp_sjobhelp 'jname=dump tran mbis_gj','list'
2> go
job_id job_name job_description job_owner job_created job_properties job_default_timeout
----------- ---------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------------------------- ------------------------------ -------------------------- -------------------------------------------------------------------------------------------------------------------------------- -------------------
4 dump tran mbis_gj job_operator Jun 25 2009 12:42PM shared 60
(1 row affected)
(return status = 0)
请高手指点一下,谢谢 |
|