September 15, 2005 at 11:03 am
I have some jobs that i have inherited on my SQL server. One of them has 14 steps!!! is there a way i can open the job in TSQL in order to prevent me from having to copy all the steps one by one?
September 15, 2005 at 11:35 am
Have you tried scripting them out, using Enterprise Manager?
September 15, 2005 at 11:37 am
yes however, it scripts them as if i wanted to create it with all the job attributes, thus completly over complicating it...
September 15, 2005 at 11:42 am
Try going to 'msdb' and running:
SELECT j.name job_name
, s.step_id
, s.step_name
, s.command
FROM sysjobs j
JOIN sysjobsteps s ON j.job_id = s.job_id
ORDER BY j.name
September 15, 2005 at 11:46 am
kool... any idea how i can get the Command column to actually show all the info. i'm assuming the data type cuts it off...
September 15, 2005 at 11:55 am
It should pretty much all be there. The 'sysjobsteps.command' column is defined as an NVARCHAR (3200), meaning it will hold 1600 characters. I've never tried creating a job step that had more characters than that. If you're looking at it through Query Analyzer, double-click the right end of the column header, and it ought to expand. If your Query Analyzer row output still looks truncated, go to Tools -> Options -> Results and bump up your 'maximum columns per column value (I've set mine at 8000).
September 15, 2005 at 11:59 am
THANKS A MILLION!! that did it
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply