SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Exporting SQL Job


Exporting SQL Job

Author
Message
New2SQL-343122
New2SQL-343122
Say Hey Kid
Say Hey Kid (665 reputation)Say Hey Kid (665 reputation)Say Hey Kid (665 reputation)Say Hey Kid (665 reputation)Say Hey Kid (665 reputation)Say Hey Kid (665 reputation)Say Hey Kid (665 reputation)Say Hey Kid (665 reputation)

Group: General Forum Members
Points: 665 Visits: 1027
Hi,

How to export SQL Jobs which under SQL Server Agent -> Jobs -> (All the jobs).

Just want to export these jobs from Server A to Server B.

I have already tried with msdb but unfortunatly it had failed to restored it.

Thanks in advance for any inputs.

Regards,
Mohanraj Jayaraman
Krishnaraj9
Krishnaraj9
Mr or Mrs. 500
Mr or Mrs. 500 (591 reputation)Mr or Mrs. 500 (591 reputation)Mr or Mrs. 500 (591 reputation)Mr or Mrs. 500 (591 reputation)Mr or Mrs. 500 (591 reputation)Mr or Mrs. 500 (591 reputation)Mr or Mrs. 500 (591 reputation)Mr or Mrs. 500 (591 reputation)

Group: General Forum Members
Points: 591 Visits: 663
Script all the jobs using Management studio in Server A and apply the script in Server B
Make sure the output path is valid
New2SQL-343122
New2SQL-343122
Say Hey Kid
Say Hey Kid (665 reputation)Say Hey Kid (665 reputation)Say Hey Kid (665 reputation)Say Hey Kid (665 reputation)Say Hey Kid (665 reputation)Say Hey Kid (665 reputation)Say Hey Kid (665 reputation)Say Hey Kid (665 reputation)

Group: General Forum Members
Points: 665 Visits: 1027
There are more than 150 Jobs are running, this is painfull task to copy the each jobs and pasting at the destination servers.

I am using SQL Servef 2005 64 Bit and couldn't do multiple select also.

Is there any script which will generate script for the jobs.

Regards,
Mohanraj Jayaraman
SQLBOT
SQLBOT
Hall of Fame
Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)

Group: General Forum Members
Points: 3358 Visits: 836
I believe you can use the copy database wizard to move jobs.
Just set up a 'sacrificial' database, right click -- tasks -- copy database

Run through the Wizard and I think you have the option to select agent jobs to copy.


~Craig

Craig Outcalt
MCITP, MCDBA

Craig Outcalt



Tips for new DBAs: http://www.sqlservercentral.com/articles/Career/64632
My other articles: http://www.sqlservercentral.com/Authors/Articles/Craig_Outcalt/560258
Greg Charles
Greg Charles
SSCoach
SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)

Group: General Forum Members
Points: 19264 Visits: 5992
Re: scripting jobs, you can script all the jobs in an instance into one file in SSMS if you click on "Jobs" in Object Explorer then highlight all the jobs in the Details panel, right-click and select "Script Job As...".

Then you only have one script to run in the Server B.

Greg
homebrew01
homebrew01
SSC-Insane
SSC-Insane (22K reputation)SSC-Insane (22K reputation)SSC-Insane (22K reputation)SSC-Insane (22K reputation)SSC-Insane (22K reputation)SSC-Insane (22K reputation)SSC-Insane (22K reputation)SSC-Insane (22K reputation)

Group: General Forum Members
Points: 22204 Visits: 9222
If you have anything that's server specific, such as operator names for email notification, then make sure they already exist on the target server. You can script them out & copy them first.



altitude00
altitude00
Valued Member
Valued Member (70 reputation)Valued Member (70 reputation)Valued Member (70 reputation)Valued Member (70 reputation)Valued Member (70 reputation)Valued Member (70 reputation)Valued Member (70 reputation)Valued Member (70 reputation)

Group: General Forum Members
Points: 70 Visits: 152
create a simple ssis package in which you have a tool called "transfer job task" , if you want you can pick the jobs or you can select all. and run the package ... boom all your 150 jobs will be transffed with in a min or 2 .
erikskinner
erikskinner
Valued Member
Valued Member (52 reputation)Valued Member (52 reputation)Valued Member (52 reputation)Valued Member (52 reputation)Valued Member (52 reputation)Valued Member (52 reputation)Valued Member (52 reputation)Valued Member (52 reputation)

Group: General Forum Members
Points: 52 Visits: 62
My recommendation is to use SSMS a newer flavor the better. use the Object Explorer Details. This allows you to highlight multiple objects. Click on the Jobs tree on the server and the jobs will appear in Object Explorer Details. Run the task to create script. With minor editing you should be able to recreate jobs.

Good luck.
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