开发者

how to view the job in text in sql server 2005

开发者 https://www.devze.com 2022-12-29 05:50 出处:网络
Ex: for store procedure we use 开发者_如何学Pythonsp_helptext .is there any keyword for viewing jobs in text in sql server 2005

Ex: for store procedure we use 开发者_如何学Pythonsp_helptext .is there any keyword for viewing jobs in text in sql server 2005

regards kumar


You can query the various tables in msdb database to get the list of the jobs and their details.

For example

select * from msbdb.dbo.sysjobs

will give you the list of all the jobs in the server while

select * from msdb.dbo.sysjobactivity 

will give you the job activity details.


For stuff like this where I know how to do something in Management Studio but aren't sure of the way to do it by code I sometimes start a profiler trace then perform the action in Management Studio to see what that is doing. Doing that on my system indicates that the following might help.

exec msdb.dbo.sp_help_jobstep @job_name = 'Your job name'

If you look at the definition of that it seems to use msdb.dbo.sysjobsteps

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号