How do I schedule the jobs to run in sequence? I have created a package to
call the sql server agent jobs in sequence but looks like all the jobs are
running at the same time, not waiting for the other jobs to complete. I did
put the constriants not to run the second job until the first job is
complete. But still it is not behaving as instructed.
Any thoughts,
Thanks,
MariJobs run asynchronously and independently of each other.
You need to make ONE job and call each "job" as an individual step. That
way, "job"/step 2 will not start until "job"/step 1 is complete (and you can
terminate the whole sequence on an individual step failure, or you can have
individual step failures ignored and just move to the next step).
"Maria" <Maria@.discussions.microsoft.com> wrote in message
news:B7B1BBAC-F54E-48C6-A871-A9FBFE1BB0C2@.microsoft.com...
> How do I schedule the jobs to run in sequence? I have created a package to
> call the sql server agent jobs in sequence but looks like all the jobs are
> running at the same time, not waiting for the other jobs to complete. I
> did
> put the constriants not to run the second job until the first job is
> complete. But still it is not behaving as instructed.
> Any thoughts,
> Thanks,
> Mari|||Thank you Aaron. But there is no option to define the "type" for sql server
Agent jobs to call the another job. I guess you know what I am talking.
When I am creating the 'job', for the step 1, there is no Agent Jobs
options. We have only IS package or AS or activeX etc., but not the agent
jobs : (
Tks
"Aaron Bertrand [SQL Server MVP]" wrote:
> Jobs run asynchronously and independently of each other.
> You need to make ONE job and call each "job" as an individual step. That
> way, "job"/step 2 will not start until "job"/step 1 is complete (and you c
an
> terminate the whole sequence on an individual step failure, or you can hav
e
> individual step failures ignored and just move to the next step).
>
> "Maria" <Maria@.discussions.microsoft.com> wrote in message
> news:B7B1BBAC-F54E-48C6-A871-A9FBFE1BB0C2@.microsoft.com...
>
>|||If you are using SQL Server 2005, Service Broker can be used to guarantee
in-order execution:
http://www.microsoft.com/technet/te...lt.a
spx
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"Maria" <Maria@.discussions.microsoft.com> wrote in message
news:B7B1BBAC-F54E-48C6-A871-A9FBFE1BB0C2@.microsoft.com...
> How do I schedule the jobs to run in sequence? I have created a package to
> call the sql server agent jobs in sequence but looks like all the jobs are
> running at the same time, not waiting for the other jobs to complete. I
> did
> put the constriants not to run the second job until the first job is
> complete. But still it is not behaving as instructed.
> Any thoughts,
> Thanks,
> Mari|||Maria wrote:
> How do I schedule the jobs to run in sequence? I have created a package to
> call the sql server agent jobs in sequence but looks like all the jobs are
> running at the same time, not waiting for the other jobs to complete. I di
d
> put the constriants not to run the second job until the first job is
> complete. But still it is not behaving as instructed.
> Any thoughts,
> Thanks,
> Mari
Are you referring to SQL Agent jobs, or tasks within a DTS package?|||It is "Execute SQL Server Agent Job Task" under Maintenance Plan Tasks for a
DTS package.
"Tracy McKibben" wrote:
> Maria wrote:
> Are you referring to SQL Agent jobs, or tasks within a DTS package?
>|||Maria wrote:
> It is "Execute SQL Server Agent Job Task" under Maintenance Plan Tasks for
a
> DTS package.
>
I'm not familiar with that one. So, you're using a DTS package to
execute Maintenance Plan tasks. Is the DTS package then going to be
scheduled to run via SQL Agent? Seems sorta bass-ackwards... Am I
completely not understanding what you're trying to accomplish?|||I think your understanding is right. But looks like that doesn't work. When
I
created the package to run all these jobs in a sequence, all thejobs are
running at the same time though I put constraints on it.
Hope this is clear.
thanks
"Tracy McKibben" wrote:
> Maria wrote:
> I'm not familiar with that one. So, you're using a DTS package to
> execute Maintenance Plan tasks. Is the DTS package then going to be
> scheduled to run via SQL Agent? Seems sorta bass-ackwards... Am I
> completely not understanding what you're trying to accomplish?
>|||Hi Roger,
I never used the Broker Service. Could you give some more details how to use
this service to schedule batch jobs.
Thanks
"Roger Wolter[MSFT]" wrote:
> If you are using SQL Server 2005, Service Broker can be used to guarantee
> in-order execution:
> http://www.microsoft.com/technet/te...lt
.aspx
>
> --
> This posting is provided "AS IS" with no warranties, and confers no rights
.
> Use of included script samples are subject to the terms specified at
> http://www.microsoft.com/info/cpyright.htm
> "Maria" <Maria@.discussions.microsoft.com> wrote in message
> news:B7B1BBAC-F54E-48C6-A871-A9FBFE1BB0C2@.microsoft.com...
>
>|||Maria wrote:
> I think your understanding is right. But looks like that doesn't work. Whe
n I
> created the package to run all these jobs in a sequence, all thejobs are
> running at the same time though I put constraints on it.
>
Ok... Well, that leads me to ask, why not just let the maintenance plan
schedule the jobs in SQL Agent like it's supposed to, instead of
wrapping them in a DTS package like this?
I'll go one step further, and suggest that you dump the maintenance plan
altogether, and write your own processes to do what the maintenance plan
offers you. Write your own BACKUP job, write your own index maintenance
routine, don't shrink your databases. You'll learn alot more about your
environment by doing so...sql
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment