How to view the job in text in sql server 2005

Ex: we use sp_helptext for the storage procedure. Is there any keyword to view assignments in text in sql server 2005

Best regards Kumar

+2


a source to share


2 answers


For things like this, where I know how to do something in Management Studio, but not sure how to do it with code, I sometimes run a profiler trace and then execute an action in Management Studio to see what it does ... Doing this on my system means the following might help.

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

      



If you look at the definition of what it uses msdb.dbo.sysjobsteps

+2


a source


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

for instance

select * from msbdb.dbo.sysjobs

      



will give you a list of all jobs on the server, and

select * from msdb.dbo.sysjobactivity 

      

will give you information about the job.

+3


a source







All Articles