dbTalk Databases Forums  

Execute Package Task Pass/Fail

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


Discuss Execute Package Task Pass/Fail in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Simon M
 
Posts: n/a

Default Execute Package Task Pass/Fail - 07-13-2005 , 05:47 AM






Hi,

I'm having trouble calling an Execute Package Task from within my DTS job.
I want to be able to take different routes in the Parent job depending on
the Success or Failure of the Child job.
I can get things to work correctly if i select the option in the child DTS
job for a step to fail the whole package on failure...
But i want to be able to execute other tasks in the Child job after a steps
failure and i need the task to fail, or look like it's failed, once these are
complete..
At the moment, if a step fails in the child DTS job and it doesn't have the
option to fail the package, the DTS job is seen to have completed
successfully...

Is there any way to pass the failure of any one step in the child DTS job up
as a Package execution failure?

Thanks

Simon

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

Default Re: Execute Package Task Pass/Fail - 07-13-2005 , 06:54 AM






This is a limitation of DTS and the Exec Pkg Task. You can use an ActiveX
Script, but with the greater maintenance overhead of writing the script
yourself-

Execute a package from a package
(http://www.sqldts.com/default.aspx?215)

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


"Simon M" <SimonM (AT) discussions (DOT) microsoft.com> wrote

Quote:
Hi,

I'm having trouble calling an Execute Package Task from within my DTS job.
I want to be able to take different routes in the Parent job depending on
the Success or Failure of the Child job.
I can get things to work correctly if i select the option in the child DTS
job for a step to fail the whole package on failure...
But i want to be able to execute other tasks in the Child job after a
steps
failure and i need the task to fail, or look like it's failed, once these
are
complete..
At the moment, if a step fails in the child DTS job and it doesn't have
the
option to fail the package, the DTS job is seen to have completed
successfully...

Is there any way to pass the failure of any one step in the child DTS job
up
as a Package execution failure?

Thanks

Simon



Reply With Quote
  #3  
Old   
fleo
 
Posts: n/a

Default Re: Execute Package Task Pass/Fail - 09-08-2005 , 06:54 PM



I added an ActiveX Task at the end of the child package:
set the package to "Fail On First Error" (oPkg.FailOnFirstError=true)
Return Main = StepFailure

You also need to initialize FailOnFirstError to false at the beginning of
the package.

"Darren Green" wrote:

Quote:
This is a limitation of DTS and the Exec Pkg Task. You can use an ActiveX
Script, but with the greater maintenance overhead of writing the script
yourself-

Execute a package from a package
(http://www.sqldts.com/default.aspx?215)

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


"Simon M" <SimonM (AT) discussions (DOT) microsoft.com> wrote in message
news:589ACDE7-4B2C-4F94-B57B-DE44D60BBFCB (AT) microsoft (DOT) com...
Hi,

I'm having trouble calling an Execute Package Task from within my DTS job.
I want to be able to take different routes in the Parent job depending on
the Success or Failure of the Child job.
I can get things to work correctly if i select the option in the child DTS
job for a step to fail the whole package on failure...
But i want to be able to execute other tasks in the Child job after a
steps
failure and i need the task to fail, or look like it's failed, once these
are
complete..
At the moment, if a step fails in the child DTS job and it doesn't have
the
option to fail the package, the DTS job is seen to have completed
successfully...

Is there any way to pass the failure of any one step in the child DTS job
up
as a Package execution failure?

Thanks

Simon




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.