Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Scripting Sql Server 2000 Agent Jobs


Scripting Sql Server 2000 Agent Jobs

Author
Message
Bharatvip
Bharatvip
SSC Rookie
SSC Rookie (39 reputation)SSC Rookie (39 reputation)SSC Rookie (39 reputation)SSC Rookie (39 reputation)SSC Rookie (39 reputation)SSC Rookie (39 reputation)SSC Rookie (39 reputation)SSC Rookie (39 reputation)

Group: General Forum Members
Points: 39 Visits: 144
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.



Ian Scarlett
Ian Scarlett
SSCommitted
SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)

Group: General Forum Members
Points: 1558 Visits: 6465
Right click Jobs, click All Tasks, Generate SQL Script.

That will script all the jobs on the server.



Eswin
Eswin
SSCommitted
SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)

Group: General Forum Members
Points: 1685 Visits: 1078
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 :-D
Bharatvip
Bharatvip
SSC Rookie
SSC Rookie (39 reputation)SSC Rookie (39 reputation)SSC Rookie (39 reputation)SSC Rookie (39 reputation)SSC Rookie (39 reputation)SSC Rookie (39 reputation)SSC Rookie (39 reputation)SSC Rookie (39 reputation)

Group: General Forum Members
Points: 39 Visits: 144
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



solalekan
solalekan
Forum Newbie
Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)

Group: General Forum Members
Points: 3 Visits: 15
There is no ALL Task option when you right click JOBS in SQL 2000. Am i missing something? Thanks!
calinsmum
calinsmum
Forum Newbie
Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)

Group: General Forum Members
Points: 3 Visits: 4
Use Enterprise Manager in SQL2000. All tasks not available via Management Studio for SQL2000.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search