Friday, March 30, 2012

Job with steps problem

Hi all,
I have Windows 2003 r2 Server x64, sql 2005 sp1 x64 with sql 2000 latest sp
on one machine.
In SQL2005 I have created 2 maintenance plans - one for 2005 and second for
2000
Also created 3rd job (first 2 were generated by maintenance plans) with the
following steps:
1. cmd to move filese from A to B
2. SQL SISP package \Maintenance Plans\2005
3. SQL SISP package \Maintenance Plans\2000
When I execute that job it goes to step one and move those file, it's ok.
But step 2 and 3 are not executed correctly, I mean they are executed
(Successful) but that maintenance plan is not executing. After all I'm
getting the successful result but no backup are mage :(
Tried to execute those maintenance plans one by one. 2000 - successful but
nothing happens, the same is for 2005
When I execute the job associated - all is ok.
How could I add defined JOB to the Job Steps, to make it all run?
Thank you in advanceAlex
I don't think it is a good idea to call job from another job's step.
I mean you have to be certain that it is really business requirements
Take a look at sp_start_job system stored procedure in the BOL
"Guzun, Alex" <a> wrote in message
news:OT%23pG$gvHHA.536@.TK2MSFTNGP06.phx.gbl...
> Hi all,
> I have Windows 2003 r2 Server x64, sql 2005 sp1 x64 with sql 2000 latest
> sp on one machine.
> In SQL2005 I have created 2 maintenance plans - one for 2005 and second
> for 2000
> Also created 3rd job (first 2 were generated by maintenance plans) with
> the following steps:
> 1. cmd to move filese from A to B
> 2. SQL SISP package \Maintenance Plans\2005
> 3. SQL SISP package \Maintenance Plans\2000
> When I execute that job it goes to step one and move those file, it's ok.
> But step 2 and 3 are not executed correctly, I mean they are executed
> (Successful) but that maintenance plan is not executing. After all I'm
> getting the successful result but no backup are mage :(
> Tried to execute those maintenance plans one by one. 2000 - successful but
> nothing happens, the same is for 2005
> When I execute the job associated - all is ok.
> How could I add defined JOB to the Job Steps, to make it all run?
> Thank you in advance|||Hm... don't know what is BOL, and how to use sp_start_job system stored
procedure
I'm just a guy that using GUI for SQL
I need to achieve those job to run as 1, 2, 3.
2nd will wait for 1, to end and so on :(
Please help me if you can
Thanks in advance
"Uri Dimant" <urid@.iscar.co.il> wrote in message
news:#jzRXGhvHHA.2288@.TK2MSFTNGP05.phx.gbl...
> Alex
> I don't think it is a good idea to call job from another job's step.
> I mean you have to be certain that it is really business requirements
> Take a look at sp_start_job system stored procedure in the BOL
>
> "Guzun, Alex" <a> wrote in message
> news:OT%23pG$gvHHA.536@.TK2MSFTNGP06.phx.gbl...
>> Hi all,
>> I have Windows 2003 r2 Server x64, sql 2005 sp1 x64 with sql 2000 latest
>> sp on one machine.
>> In SQL2005 I have created 2 maintenance plans - one for 2005 and second
>> for 2000
>> Also created 3rd job (first 2 were generated by maintenance plans) with
>> the following steps:
>> 1. cmd to move filese from A to B
>> 2. SQL SISP package \Maintenance Plans\2005
>> 3. SQL SISP package \Maintenance Plans\2000
>> When I execute that job it goes to step one and move those file, it's ok.
>> But step 2 and 3 are not executed correctly, I mean they are executed
>> (Successful) but that maintenance plan is not executing. After all I'm
>> getting the successful result but no backup are mage :(
>> Tried to execute those maintenance plans one by one. 2000 - successful
>> but nothing happens, the same is for 2005
>> When I execute the job associated - all is ok.
>> How could I add defined JOB to the Job Steps, to make it all run?
>> Thank you in advance
>
>|||Alex
BOL -Books On Line that is a part of SQL Server Client Tools installation.
Can you create three jobs and and checking the status by using sp_help_job?
"Guzun, Alex" <a> wrote in message
news:%23tGvRWjvHHA.1168@.TK2MSFTNGP02.phx.gbl...
> Hm... don't know what is BOL, and how to use sp_start_job system stored
> procedure
> I'm just a guy that using GUI for SQL
> I need to achieve those job to run as 1, 2, 3.
> 2nd will wait for 1, to end and so on :(
> Please help me if you can
> Thanks in advance
> "Uri Dimant" <urid@.iscar.co.il> wrote in message
> news:#jzRXGhvHHA.2288@.TK2MSFTNGP05.phx.gbl...
>> Alex
>> I don't think it is a good idea to call job from another job's step.
>> I mean you have to be certain that it is really business requirements
>> Take a look at sp_start_job system stored procedure in the BOL
>>
>> "Guzun, Alex" <a> wrote in message
>> news:OT%23pG$gvHHA.536@.TK2MSFTNGP06.phx.gbl...
>> Hi all,
>> I have Windows 2003 r2 Server x64, sql 2005 sp1 x64 with sql 2000 latest
>> sp on one machine.
>> In SQL2005 I have created 2 maintenance plans - one for 2005 and second
>> for 2000
>> Also created 3rd job (first 2 were generated by maintenance plans) with
>> the following steps:
>> 1. cmd to move filese from A to B
>> 2. SQL SISP package \Maintenance Plans\2005
>> 3. SQL SISP package \Maintenance Plans\2000
>> When I execute that job it goes to step one and move those file, it's
>> ok. But step 2 and 3 are not executed correctly, I mean they are
>> executed (Successful) but that maintenance plan is not executing. After
>> all I'm getting the successful result but no backup are mage :(
>> Tried to execute those maintenance plans one by one. 2000 - successful
>> but nothing happens, the same is for 2005
>> When I execute the job associated - all is ok.
>> How could I add defined JOB to the Job Steps, to make it all run?
>> Thank you in advance
>>|||Sorry :)
I have 2 jobs for 2 maintenance plans
Got also 3 job with cmd script to move files from DAY folder to WEEK folder
And everyday I'll tape DAY folder
Now I want them to run one by one, don't want to calculate time intervals
for each one
Thanks
"Uri Dimant" <urid@.iscar.co.il> wrote in message
news:#DnGyajvHHA.1164@.TK2MSFTNGP02.phx.gbl...
> Alex
> BOL -Books On Line that is a part of SQL Server Client Tools installation.
> Can you create three jobs and and checking the status by using
> sp_help_job?
>
> "Guzun, Alex" <a> wrote in message
> news:%23tGvRWjvHHA.1168@.TK2MSFTNGP02.phx.gbl...
>> Hm... don't know what is BOL, and how to use sp_start_job system stored
>> procedure
>> I'm just a guy that using GUI for SQL
>> I need to achieve those job to run as 1, 2, 3.
>> 2nd will wait for 1, to end and so on :(
>> Please help me if you can
>> Thanks in advance
>> "Uri Dimant" <urid@.iscar.co.il> wrote in message
>> news:#jzRXGhvHHA.2288@.TK2MSFTNGP05.phx.gbl...
>> Alex
>> I don't think it is a good idea to call job from another job's step.
>> I mean you have to be certain that it is really business requirements
>> Take a look at sp_start_job system stored procedure in the BOL
>>
>> "Guzun, Alex" <a> wrote in message
>> news:OT%23pG$gvHHA.536@.TK2MSFTNGP06.phx.gbl...
>> Hi all,
>> I have Windows 2003 r2 Server x64, sql 2005 sp1 x64 with sql 2000
>> latest sp on one machine.
>> In SQL2005 I have created 2 maintenance plans - one for 2005 and second
>> for 2000
>> Also created 3rd job (first 2 were generated by maintenance plans) with
>> the following steps:
>> 1. cmd to move filese from A to B
>> 2. SQL SISP package \Maintenance Plans\2005
>> 3. SQL SISP package \Maintenance Plans\2000
>> When I execute that job it goes to step one and move those file, it's
>> ok. But step 2 and 3 are not executed correctly, I mean they are
>> executed (Successful) but that maintenance plan is not executing. After
>> all I'm getting the successful result but no backup are mage :(
>> Tried to execute those maintenance plans one by one. 2000 - successful
>> but nothing happens, the same is for 2005
>> When I execute the job associated - all is ok.
>> How could I add defined JOB to the Job Steps, to make it all run?
>> Thank you in advance
>>
>

No comments:

Post a Comment