Help - How to copy SQL agent job ?

  • I have a large, multi step SQL agent job which I would like to modify slightly, whilst leaving the original intact.

    Rather than recreate this SQL job - which would take me ages, I would like to copy the existing job and recreate with a new name.

    I know this sounds really simple, but I cant work how to do it using Enterprise manager ? As you can probably, tell, I am not an greatly experienced user os SQL Ent Mgr!

    Can anyone help please ?

    thanks,

    Richard

  • Right-click the job in Enterprise Manager and select All Tasks, Generate SQL Script. Then change the name of the job in the script, and either make your modifications there as well or just run the script to create the copied job and make the modifications as usual in EM.

  • I know that some people use GO statements in their individual steps, make sure the ones you're scripting dont contain any or you might encounter problems applying the job to another server.

  • If you have GO statements, edit the script replace GO with GOXYZ (or something else). Run the script and then you will need to edit each job step with the GOXYZ back to GO - not nice but it works.

     

  • I know this is really basic but I did what you said to copy my job.  It acted as if it copied it but I don't see it in with my other jobs.  How do I get it to show up with the other jobs so I can edit it?

    HELP

  • Just did this and it worked fine so I'm going ask the stupid questions:

    Are you SURE you renamed the job Title ? (In more than one place)

    Are you using EM and have done a refresh to see any new items ?

    Have you checked the created date of the job you scripted ?

    Cheers,

    DB


    The systems fine with no users loggged in. Can we keep it that way ?br>

  • Ok,  I'm in EM and I Generate SQL Script - I rename it to Test. I refreshed - Logged Out and it still is not there. 

    I did a search on the server for the file.  The file is in Program Files\Microsoft SQL Server\80\tools\Binn.  But it does not show up in EM. 

    The Date the job was last modified was 4/28/05 for the orginial file and today for the test file in the location mentioned above.

    I am really confused!!

    Vickie

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

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