Saturday, February 25, 2012

copy a job from one database to another

Hi, new to sql server 2000, wondering if there is a easy way to copy a job
from my test database to production database...they are on same instance...
Thanks,
GerryYou can right click on the Job, select [All Tasks], and select [Gene
rate SQL
Script].
Then edit the file, changing the name of the server, and run the script on
the Production server.
Arnie Rowland
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
"gerry m" <gerrym@.discussions.microsoft.com> wrote in message
news:706D9450-E992-4B7C-811F-745E3DA3C270@.microsoft.com...
> Hi, new to sql server 2000, wondering if there is a easy way to copy a job
> from my test database to production database...they are on same
> instance...
> Thanks,
> Gerry|||Thank you Anne...I will give this a try tonite...
Gerry
"Arnie Rowland" wrote:

> You can right click on the Job, select [All Tasks], and select [Ge
nerate SQL
> Script].
> Then edit the file, changing the name of the server, and run the script on
> the Production server.
> --
> Arnie Rowland
> Most good judgment comes from experience.
> Most experience comes from bad judgment.
> - Anonymous
>
> "gerry m" <gerrym@.discussions.microsoft.com> wrote in message
> news:706D9450-E992-4B7C-811F-745E3DA3C270@.microsoft.com...
>
>|||Anne, is there a way to keep it structured with steps and to set up on a new
schedule (like it is in the test db?)
Thanks,
Gerry
"gerry m" wrote:
[vbcol=seagreen]
> Thank you Anne...I will give this a try tonite...
> Gerry
> "Arnie Rowland" wrote:
>|||The script will contain the same steps and the same schedule. If you need to
change the schedule, it is best done after the Job is in the new server.
Arnie Rowland
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
"gerry m" <gerrym@.discussions.microsoft.com> wrote in message
news:CF0C8A51-3738-4DC2-A508-36DC1C2FE1AB@.microsoft.com...[vbcol=seagreen]
> Anne, is there a way to keep it structured with steps and to set up on a
> new
> schedule (like it is in the test db?)
> Thanks,
> Gerry
> "gerry m" wrote:
>|||Arnie, I am a bit confused...I generated the script and edited it for the ne
w
database name, but am at a loss to work all that script into the 'create new
job' box without having to break it all down into steps
"Arnie Rowland" wrote:

> The script will contain the same steps and the same schedule. If you need
to
> change the schedule, it is best done after the Job is in the new server.
> --
> Arnie Rowland
> Most good judgment comes from experience.
> Most experience comes from bad judgment.
> - Anonymous
>
> "gerry m" <gerrym@.discussions.microsoft.com> wrote in message
> news:CF0C8A51-3738-4DC2-A508-36DC1C2FE1AB@.microsoft.com...
>
>|||You take the script that was generated, and you execute the entire script in
Query Analyzer. It will then recreate the Job and you can edit using
Enterprise Manager.
Arnie Rowland
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
"gerry m" <gerrym@.discussions.microsoft.com> wrote in message
news:1639671C-E028-4910-AA43-38012BB3AFFC@.microsoft.com...[vbcol=seagreen]
> Arnie, I am a bit confused...I generated the script and edited it for the
> new
> database name, but am at a loss to work all that script into the 'create
> new
> job' box without having to break it all down into steps
> "Arnie Rowland" wrote:
>|||Jobs are server specific, not database. So, you may want to script the job
in Enterprise Manager (right click on the job in Enterprise Manager, to get
to the scripting options) and recreate the job with a different name (you
have to edit the sp_add_job in the script). Once the job is recreated with a
different name, you can edit it to change the database context.
--
HTH,
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
"gerry m" <gerrym@.discussions.microsoft.com> wrote in message
news:706D9450-E992-4B7C-811F-745E3DA3C270@.microsoft.com...
> Hi, new to sql server 2000, wondering if there is a easy way to copy a job
> from my test database to production database...they are on same
> instance...
> Thanks,
> Gerry|||Arnie, thanks for your help and time, this worked fine.
Thanks again,
Gerry
"Arnie Rowland" wrote:

> You take the script that was generated, and you execute the entire script
in
> Query Analyzer. It will then recreate the Job and you can edit using
> Enterprise Manager.
> --
> Arnie Rowland
> Most good judgment comes from experience.
> Most experience comes from bad judgment.
> - Anonymous
>
> "gerry m" <gerrym@.discussions.microsoft.com> wrote in message
> news:1639671C-E028-4910-AA43-38012BB3AFFC@.microsoft.com...
>
>

No comments:

Post a Comment