免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1899 | 回复: 1
打印 上一主题 下一主题

关于ASE jobscheduler命令 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-07-09 11:37 |只看该作者 |倒序浏览
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)

请高手指点一下,谢谢

论坛徽章:
0
2 [报告]
发表于 2009-07-09 23:46 |只看该作者
sp_sjobhelp @name= ,@option=

这两个@后面跟的东西是指变量(或曰参数),就是说存贮过程会按照你输入参数的顺序和内容自动给sp_sjobhelp的@name和@option赋值,可以sp_helptext看一下,如果不输入的话那ASE就按照在sp_sjobhelp里指定了的默认值进行处理
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP