Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Scripting Sql Server 2000 Agent Jobs Expand / Collapse
Author
Message
Posted Thursday, June 4, 2009 11:49 PM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Monday, May 13, 2013 10:33 PM
Points: 26, Visits: 100

We have a Server that has sql server 2000 installed on it. There are about 36 jobs with different schedules and different jobs backup to different disk drives and there are also jobs that do other db maintenance things like re-indexing etc.

I have got a second server with the same disk drive names as server one, now I want to create on this server all the jobs that we have on the first server.

Is there a way to script all the jobs with a command or a utility script from server one and then run it on server two and create all the jobs on server two. Doing one by one would be very painful. I don't see anything in Enterprise manager that seems to do this

Thanks,
Bharat.




Post #729427
Posted Friday, June 5, 2009 2:07 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Monday, June 16, 2014 7:32 AM
Points: 1,327, Visits: 4,504
Right click Jobs, click All Tasks, Generate SQL Script.

That will script all the jobs on the server.



Post #729466
Posted Friday, June 5, 2009 2:28 AM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Monday, October 28, 2013 8:50 AM
Points: 1,607, Visits: 1,039
when you script out the jobs see to it that your tsql job steps dont have "GO" batch breaker.

If its there the script will give error while executing.

It seams you should replace "Go" with other batch breakers not sure which one.





Tanx
Post #729474
Posted Friday, June 5, 2009 10:09 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Monday, May 13, 2013 10:33 PM
Points: 26, Visits: 100
Thanks!

Yes three are several 'GO' in the individual jobs. I guess it would be ok to script them first and then deal with the 'GO' separators within the jobs. There are 'GO' seperators that separate the individual jobs I see in this all jobs script I generated.

BV



Post #729873
Posted Friday, March 25, 2011 2:33 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, November 15, 2011 3:22 PM
Points: 1, Visits: 15
There is no ALL Task option when you right click JOBS in SQL 2000. Am i missing something? Thanks!
Post #1084353
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse