Exporting SQL Job

  • 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

  • Script all the jobs using Management studio in Server A and apply the script in Server B

    Make sure the output path is valid

  • 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

  • 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

  • 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

  • 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.

  • 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 .

  • 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.

Viewing 8 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic. Login to reply