dbTalk Databases Forums  

Package does not fail even though sub-package fails

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Package does not fail even though sub-package fails in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Charles Bourque
 
Posts: n/a

Default Package does not fail even though sub-package fails - 01-21-2005 , 09:53 AM






I have a master control package that execute a bunch of other control
packages which then execute actual DTS code modules.

The problem is that a specific DTS packages fails and then returns a fail to
the first calling control package which then traps the failed state and then
it is supposed to fail and return a failed state to the master control
package. The problem is that when I look at the logs, all packages fail as
expected except for the master control which returns a status of OK and keeps
going down the workflow.

So, Package A performs an execute package on Package B, package B then
performs an execute package on Package C. Package C runs and during its
processing fails cause a specific error was trapped and it coded to return a
failed state. Package C logs the Failed state of the package. Package B,
gets this failed stats as it should and terminates its workflow as expected.
It also logs a failed stats in the log. Package A, does not get the failed
state of package B.

What am I doing wrong? All 3 packages have the "Fail package on first
error". The master control package should fail also but it isn't.

Reply With Quote
  #2  
Old   
Darren Green
 
Posts: n/a

Default Re: Package does not fail even though sub-package fails - 01-21-2005 , 11:30 AM






To force the child package failure to cause an error in the parent package
step you need to set Fail on first error within the child package
properties.


--
Darren Green
http://www.sqldts.com

"Charles Bourque" <Charles Bourque (AT) discussions (DOT) microsoft.com> wrote in
message news:63BF30D4-8058-4F76-8C6C-DB45DA52B490 (AT) microsoft (DOT) com...
Quote:
I have a master control package that execute a bunch of other control
packages which then execute actual DTS code modules.

The problem is that a specific DTS packages fails and then returns a fail
to
the first calling control package which then traps the failed state and
then
it is supposed to fail and return a failed state to the master control
package. The problem is that when I look at the logs, all packages fail
as
expected except for the master control which returns a status of OK and
keeps
going down the workflow.

So, Package A performs an execute package on Package B, package B then
performs an execute package on Package C. Package C runs and during its
processing fails cause a specific error was trapped and it coded to return
a
failed state. Package C logs the Failed state of the package. Package B,
gets this failed stats as it should and terminates its workflow as
expected.
It also logs a failed stats in the log. Package A, does not get the
failed
state of package B.

What am I doing wrong? All 3 packages have the "Fail package on first
error". The master control package should fail also but it isn't.



Reply With Quote
  #3  
Old   
Charles Bourque
 
Posts: n/a

Default Re: Package does not fail even though sub-package fails - 01-21-2005 , 11:39 AM



I wasn't clear on that but each package has that option set ...

"Darren Green" wrote:

Quote:
To force the child package failure to cause an error in the parent package
step you need to set Fail on first error within the child package
properties.


--
Darren Green
http://www.sqldts.com

"Charles Bourque" <Charles Bourque (AT) discussions (DOT) microsoft.com> wrote in
message news:63BF30D4-8058-4F76-8C6C-DB45DA52B490 (AT) microsoft (DOT) com...
I have a master control package that execute a bunch of other control
packages which then execute actual DTS code modules.

The problem is that a specific DTS packages fails and then returns a fail
to
the first calling control package which then traps the failed state and
then
it is supposed to fail and return a failed state to the master control
package. The problem is that when I look at the logs, all packages fail
as
expected except for the master control which returns a status of OK and
keeps
going down the workflow.

So, Package A performs an execute package on Package B, package B then
performs an execute package on Package C. Package C runs and during its
processing fails cause a specific error was trapped and it coded to return
a
failed state. Package C logs the Failed state of the package. Package B,
gets this failed stats as it should and terminates its workflow as
expected.
It also logs a failed stats in the log. Package A, does not get the
failed
state of package B.

What am I doing wrong? All 3 packages have the "Fail package on first
error". The master control package should fail also but it isn't.




Reply With Quote
  #4  
Old   
Darren Green
 
Posts: n/a

Default Re: Package does not fail even though sub-package fails - 01-21-2005 , 11:55 AM



No you were clear, I just didn't read it properly, sorry.
Double check B has the option set, as a simple repro of A, B and C packages
with Exec Pkg and a Sctipt task set to fail works fine for me. It even shows
the "stack" in the error dialog, when executed from EM. (SQL2K SP3).


--
Darren Green
http://www.sqldts.com


"Charles Bourque" <CharlesBourque (AT) discussions (DOT) microsoft.com> wrote in
message news:C118ED38-B985-4543-B571-CF3A9ABE1DC1 (AT) microsoft (DOT) com...
Quote:
I wasn't clear on that but each package has that option set ...

"Darren Green" wrote:

To force the child package failure to cause an error in the parent
package
step you need to set Fail on first error within the child package
properties.


--
Darren Green
http://www.sqldts.com

"Charles Bourque" <Charles Bourque (AT) discussions (DOT) microsoft.com> wrote in
message news:63BF30D4-8058-4F76-8C6C-DB45DA52B490 (AT) microsoft (DOT) com...
I have a master control package that execute a bunch of other control
packages which then execute actual DTS code modules.

The problem is that a specific DTS packages fails and then returns a
fail
to
the first calling control package which then traps the failed state
and
then
it is supposed to fail and return a failed state to the master control
package. The problem is that when I look at the logs, all packages
fail
as
expected except for the master control which returns a status of OK
and
keeps
going down the workflow.

So, Package A performs an execute package on Package B, package B
then
performs an execute package on Package C. Package C runs and during
its
processing fails cause a specific error was trapped and it coded to
return
a
failed state. Package C logs the Failed state of the package.
Package B,
gets this failed stats as it should and terminates its workflow as
expected.
It also logs a failed stats in the log. Package A, does not get the
failed
state of package B.

What am I doing wrong? All 3 packages have the "Fail package on first
error". The master control package should fail also but it isn't.






Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.