October 18, 2011 at 6:14 am
Hi everyone,
I want to automatically generate scripts for SQL Agent jobs using a stored procedure, is there a way of doing this.
regards,
Kabelo
October 18, 2011 at 6:25 am
there are a few script contributions here on SSC that folks have done, that will do what you are asking:
http://www.sqlservercentral.com/search/?q=script+jobs&t=s
Lowell
October 18, 2011 at 6:28 am
Try looking into sp_addjob:
http://msdn.microsoft.com/en-us/library/ms182079.aspx
and sp_addjobstep:
http://msdn.microsoft.com/en-us/library/ms187358.aspx
Regards, Iain
October 18, 2011 at 7:10 am
thanks guys
October 18, 2011 at 8:21 am
I want to automatically generate scripts for SQL Agent jobs
SSMS allows you to generate scripts for jobs (step-by-step) on one click.
October 18, 2011 at 9:16 am
I wanted a way to do that automatically
October 18, 2011 at 9:28 am
Just curious to know more:
•Is it a periodic / recurring activity?
•Do the configured jobs change quite often?
October 18, 2011 at 10:00 am
yes,
I want to create a job that creates the scripts on a daily basis and no the jobs do not change frequently
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply