all groups > sql server dts > july 2006 >
You're in the

sql server dts

group:

Child Package Fails when not all child steps are run.


Child Package Fails when not all child steps are run. miguel.salles
7/27/2006 8:14:04 AM
sql server dts:
Hi,
SQL 2000 SP4 DTS
Windows 2003 Server sp1

We have two diferent packages (parent and child) to load text files.
The child package has a condition node that decides if all steps should
be run or only the mandatory ones (the process checks the number of
files to be processed, if it is = 0 the packes exits withou error).
The child package also has a condition node to loop the steps until all
source files have been processed. (Text_Files.Quantity > 0)

When we call the child step manually it works fine no matter if
optional steps where run. (Text_Files.Quantity = Any)

When all child steps run with sucess (at least once) from a Execute
Package Task at the parent both packages work fine. (optional
step.execution Result = 0) (Text_Files.Quantity >= 1)

Whenever we call the child step from a Execute Package Task (from his
parent) and it exits without runing the optional step it fails
(optional step.execution Result = 1). (Text_Files.Quantity = 0)

Can anyone help us?

Thanks a lot.
Re: Child Package Fails when not all child steps are run. miguel.salles
7/27/2006 9:46:30 AM
Hi,

The exit is made by using a Dynamic Properties task to set the
"ExecutionStatus" of the next step to 4.
The condition is:

If filesys.FileExists("File.txt") = false Then
EndProcessGlobalVariable = 4
else
EndProcessGlobalVariable = 1
end if

So I have a activeXScprit task that check if the file exists, after
that a Dynamic Properties task to set the execution status of the next
step to "EndProcessGlobalVariable".

Thanks a lot

[quoted text, click to view]
Re: Child Package Fails when not all child steps are run. Davide
7/27/2006 2:05:02 PM
Hi Miguel,

with the Dynamic Properties task i' d set two properties of the step,
ExecutionStatus and DisableStep using two gloabal vars in this way:

File does not exist ---> ExecutionStatus = 3 ( Inactive) and
DisableStep = -1 (Disabled)
File exists ---> ExecutionStatus = 1 ( Waiting) and
DisableStep = 0 (Enabled)

Try

Bye





[quoted text, click to view]
Re: Child Package Fails when not all child steps are run. Davide
7/27/2006 4:17:38 PM
Hello miguel.salles,

[quoted text, click to view]

How do you implement the 'exit' form the package ?, and the conditional decision
?
By

Re: Child Package Fails when not all child steps are run. miguel.salles
7/28/2006 7:18:30 AM
Davide,

We have set the Execution Status and Disable Step properties for all of
the optinal steps in the Package and it is now working fine!!

Thanks very much for your help.

I will now anwer some other DTS user in the forum in order to repay my
debt...

Things are going smooth now...


[quoted text, click to view]
AddThis Social Bookmark Button