Showing posts with label calling. Show all posts
Showing posts with label calling. Show all posts

Wednesday, March 7, 2012

DTSX package calling another DTSX package question

I have a dtsx package that is calling another dtsx package, however, if the called upon dtsx package fails with errors or what not, then the calling package does not continue as well. Is there any way to override this such that if the called upon package fails, the downstream actions in that package can stop, but the calling packages downstream actions to continue?

If you are using an Execute Package Task in the first package to execute the second package, you could change the constraint value on the precedence constraint connecting the execute package task to the task(s) after that to "completion".

Hope this helps..


This posting is provided "AS IS" with no warranties, and confers no rights.

|||

Bhargavi Srivathsan wrote:

If you are using an Execute Package Task in the first package to execute the second package, you could change the constraint value on the precedence constraint connecting the execute package task to the task(s) after that to "completion".

Hope this helps..


This posting is provided "AS IS" with no warranties, and confers no rights.

And you'll need to either force the execute package task to return a success, or set the MaximumErrorCount to something greater than 1 (one) because when the child package errors out, it's failure will bubble up to the parent and stop it as well.|||however, i also do want to know if my child failed out..so i force success then i would never know..same with increasing maxerrorcount. any other way?

Friday, February 24, 2012

DTS: Strange error when calling a sub-package.

(SQL Server 2000, SP3a)
Hello all!
I've been wrestling with a bear of a problem with my DTS Package. It has a sub-package
(several of them, actually), and when I run the package in the DTS "designer" (from
Enterprise Manager) or DTSRUN.exe, everything works splendidly!
I have since made a VBScript "driver" program that is using the COM interface to DTS, and
when I execute the package, it fails with the following error:
Execution was canceled by user.
This error occurs just before calling the sub-package (which is invoked with the "Execute
Package Task"), but the previous two tasks (Dynamic Properties and ActiveX Tasks) are
successful before that Execute Package Task fails with the above error.
I've been pulling my hair out all day trying to figure out what's causing this.
If anyone can help shed some light on this issue, I'd be *hugely* obliged! Thanks in
advance!
John PetersonSet all your tasks to execute on the main thread.
Are you using Events ?
--
--
Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org
"John Peterson" <j0hnp@.comcast.net> wrote in message
news:eJTre0QTEHA.2716@.tk2msftngp13.phx.gbl...
> (SQL Server 2000, SP3a)
> Hello all!
> I've been wrestling with a bear of a problem with my DTS Package. It has
a sub-package
> (several of them, actually), and when I run the package in the DTS
"designer" (from
> Enterprise Manager) or DTSRUN.exe, everything works splendidly!
> I have since made a VBScript "driver" program that is using the COM
interface to DTS, and
> when I execute the package, it fails with the following error:
> Execution was canceled by user.
> This error occurs just before calling the sub-package (which is invoked
with the "Execute
> Package Task"), but the previous two tasks (Dynamic Properties and ActiveX
Tasks) are
> successful before that Execute Package Task fails with the above error.
> I've been pulling my hair out all day trying to figure out what's causing
this.
> If anyone can help shed some light on this issue, I'd be *hugely* obliged!
Thanks in
> advance!
> John Peterson
>|||Hey Allan!
Yeah...all my tasks were executing on the Main thread. I'm not sure what you mean by
"using Events"?
I did stumble across this issue:
http://support.microsoft.com/default.aspx?scid=kb;EN-US;319058
But I don't know how to handle events in VBScript. My guess is that I can't. :-(
"Allan Mitchell" <allan@.no-spam.sqldts.com> wrote in message
news:OrnlCDTTEHA.3944@.TK2MSFTNGP12.phx.gbl...
> Set all your tasks to execute on the main thread.
> Are you using Events ?
> --
> --
> Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
> www.SQLDTS.com - The site for all your DTS needs.
> I support PASS - the definitive, global community
> for SQL Server professionals - http://www.sqlpass.org
>
> "John Peterson" <j0hnp@.comcast.net> wrote in message
> news:eJTre0QTEHA.2716@.tk2msftngp13.phx.gbl...
> > (SQL Server 2000, SP3a)
> >
> > Hello all!
> >
> > I've been wrestling with a bear of a problem with my DTS Package. It has
> a sub-package
> > (several of them, actually), and when I run the package in the DTS
> "designer" (from
> > Enterprise Manager) or DTSRUN.exe, everything works splendidly!
> >
> > I have since made a VBScript "driver" program that is using the COM
> interface to DTS, and
> > when I execute the package, it fails with the following error:
> >
> > Execution was canceled by user.
> >
> > This error occurs just before calling the sub-package (which is invoked
> with the "Execute
> > Package Task"), but the previous two tasks (Dynamic Properties and ActiveX
> Tasks) are
> > successful before that Execute Package Task fails with the above error.
> >
> > I've been pulling my hair out all day trying to figure out what's causing
> this.
> >
> > If anyone can help shed some light on this issue, I'd be *hugely* obliged!
> Thanks in
> > advance!
> >
> > John Peterson
> >
> >
>|||Well...I got to the heart of my problem, and it can be best explained by this MS KB
article:
http://support.microsoft.com/default.aspx?scid=kb;EN-US;319058
I had someone help me write a quick-n-dirty .NET C# wrapper for the DTS package, and when
we put in the event handler for OnQueryCancel, sure enough, this bug reared its ugly head.
:-(
It's unfortunate, because I had some measure of work invested in my VBScript application,
but because I can't write an event handler in VBScript, I cannot rectify this situation in
that environment.
"John Peterson" <j0hnp@.comcast.net> wrote in message
news:eE%23GgsVTEHA.3336@.TK2MSFTNGP10.phx.gbl...
> Hey Allan!
> Yeah...all my tasks were executing on the Main thread. I'm not sure what you mean by
> "using Events"?
> I did stumble across this issue:
> http://support.microsoft.com/default.aspx?scid=kb;EN-US;319058
>
> But I don't know how to handle events in VBScript. My guess is that I can't. :-(
>
> "Allan Mitchell" <allan@.no-spam.sqldts.com> wrote in message
> news:OrnlCDTTEHA.3944@.TK2MSFTNGP12.phx.gbl...
> > Set all your tasks to execute on the main thread.
> >
> > Are you using Events ?
> >
> > --
> >
> > --
> >
> > Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
> > www.SQLDTS.com - The site for all your DTS needs.
> > I support PASS - the definitive, global community
> > for SQL Server professionals - http://www.sqlpass.org
> >
> >
> > "John Peterson" <j0hnp@.comcast.net> wrote in message
> > news:eJTre0QTEHA.2716@.tk2msftngp13.phx.gbl...
> > > (SQL Server 2000, SP3a)
> > >
> > > Hello all!
> > >
> > > I've been wrestling with a bear of a problem with my DTS Package. It has
> > a sub-package
> > > (several of them, actually), and when I run the package in the DTS
> > "designer" (from
> > > Enterprise Manager) or DTSRUN.exe, everything works splendidly!
> > >
> > > I have since made a VBScript "driver" program that is using the COM
> > interface to DTS, and
> > > when I execute the package, it fails with the following error:
> > >
> > > Execution was canceled by user.
> > >
> > > This error occurs just before calling the sub-package (which is invoked
> > with the "Execute
> > > Package Task"), but the previous two tasks (Dynamic Properties and ActiveX
> > Tasks) are
> > > successful before that Execute Package Task fails with the above error.
> > >
> > > I've been pulling my hair out all day trying to figure out what's causing
> > this.
> > >
> > > If anyone can help shed some light on this issue, I'd be *hugely* obliged!
> > Thanks in
> > > advance!
> > >
> > > John Peterson
> > >
> > >
> >
> >
>

DTS: Problems calling packages from package.

(SQL Server 2000, SP3a)
Hello all!
I have a DTS package, that I'll call "A", which calls another package "B". In A's Global
Variable (GV) space, I'm defining the following variables:
SourceServer
SourceDatabase
SourceUser
SourcePassword
DestinationServer
DestinationDatabase
DestinationUser
DestinationPassword
I also define these same GVs in B.
I have A define the values for the GVs and I believe that they should "propagate" to B by
placing these variables in the "Outer Package Global Variables" tab.
However, when I try to change a value from A, it's like B "remembers" the last successful
value that was used (it's not picking up the changed value).
Am I doing something wrong with respect to GVs and packages calling other packages?
Thanks!
John PetersonJohn
I think you will be better to put the question to DTS.newsgroup and also
look at www.sqldts.com .
Personally , I have been calling DTS Package from stored procedure which is
accepted a parameter for GV.
"John Peterson" <j0hnp@.comcast.net> wrote in message
news:OSDjL$ETEHA.2480@.TK2MSFTNGP10.phx.gbl...
> (SQL Server 2000, SP3a)
> Hello all!
> I have a DTS package, that I'll call "A", which calls another package "B".
In A's Global
> Variable (GV) space, I'm defining the following variables:
> SourceServer
> SourceDatabase
> SourceUser
> SourcePassword
> DestinationServer
> DestinationDatabase
> DestinationUser
> DestinationPassword
> I also define these same GVs in B.
> I have A define the values for the GVs and I believe that they should
"propagate" to B by
> placing these variables in the "Outer Package Global Variables" tab.
> However, when I try to change a value from A, it's like B "remembers" the
last successful
> value that was used (it's not picking up the changed value).
> Am I doing something wrong with respect to GVs and packages calling other
packages?
> Thanks!
> John Peterson
>|||Thanks Uri...however, it *seems* like it's not working correctly in my case. :-(
"Uri Dimant" <urid@.iscar.co.il> wrote in message
news:O3NZtGFTEHA.2944@.tk2msftngp13.phx.gbl...
> John
> I think you will be better to put the question to DTS.newsgroup and also
> look at www.sqldts.com .
> Personally , I have been calling DTS Package from stored procedure which is
> accepted a parameter for GV.
>
> "John Peterson" <j0hnp@.comcast.net> wrote in message
> news:OSDjL$ETEHA.2480@.TK2MSFTNGP10.phx.gbl...
> > (SQL Server 2000, SP3a)
> >
> > Hello all!
> >
> > I have a DTS package, that I'll call "A", which calls another package "B".
> In A's Global
> > Variable (GV) space, I'm defining the following variables:
> >
> > SourceServer
> > SourceDatabase
> > SourceUser
> > SourcePassword
> > DestinationServer
> > DestinationDatabase
> > DestinationUser
> > DestinationPassword
> >
> > I also define these same GVs in B.
> >
> > I have A define the values for the GVs and I believe that they should
> "propagate" to B by
> > placing these variables in the "Outer Package Global Variables" tab.
> >
> > However, when I try to change a value from A, it's like B "remembers" the
> last successful
> > value that was used (it's not picking up the changed value).
> >
> > Am I doing something wrong with respect to GVs and packages calling other
> packages?
> >
> > Thanks!
> >
> > John Peterson
> >
> >
>|||A better question might be, what exactly do the two tabs do? That is, if I want to
propagate my out (caller) package's GVs to the inner (callee), do I do that from the Outer
Package tab? Or should that be done from the Inner Package tab?
"John Peterson" <j0hnp@.comcast.net> wrote in message
news:eyt8UOFTEHA.2692@.TK2MSFTNGP09.phx.gbl...
> Thanks Uri...however, it *seems* like it's not working correctly in my case. :-(
>
> "Uri Dimant" <urid@.iscar.co.il> wrote in message
> news:O3NZtGFTEHA.2944@.tk2msftngp13.phx.gbl...
> > John
> > I think you will be better to put the question to DTS.newsgroup and also
> > look at www.sqldts.com .
> >
> > Personally , I have been calling DTS Package from stored procedure which is
> > accepted a parameter for GV.
> >
> >
> > "John Peterson" <j0hnp@.comcast.net> wrote in message
> > news:OSDjL$ETEHA.2480@.TK2MSFTNGP10.phx.gbl...
> > > (SQL Server 2000, SP3a)
> > >
> > > Hello all!
> > >
> > > I have a DTS package, that I'll call "A", which calls another package "B".
> > In A's Global
> > > Variable (GV) space, I'm defining the following variables:
> > >
> > > SourceServer
> > > SourceDatabase
> > > SourceUser
> > > SourcePassword
> > > DestinationServer
> > > DestinationDatabase
> > > DestinationUser
> > > DestinationPassword
> > >
> > > I also define these same GVs in B.
> > >
> > > I have A define the values for the GVs and I believe that they should
> > "propagate" to B by
> > > placing these variables in the "Outer Package Global Variables" tab.
> > >
> > > However, when I try to change a value from A, it's like B "remembers" the
> > last successful
> > > value that was used (it's not picking up the changed value).
> > >
> > > Am I doing something wrong with respect to GVs and packages calling other
> > packages?
> > >
> > > Thanks!
> > >
> > > John Peterson
> > >
> > >
> >
> >
>|||From this article: http://www.winnetmag.com/SQLServer/Article/ArticleID/19747/19747.html
<Quote>
Inside the Execute Package task, you can easily pass global variables to the child
package, as Figure 1 shows. If you click the Inner Package Global Variables tab in the
Execute Package task, DTS scans the child package for any global variables that it
expects, and you can set them to your own values. Inner global variables let you set the
global variables for the child package from the Execute Package task. Inner global
variables are useful when you're calling auditing packages and you want to pass to the
child package certain errors based on events in the parent package. Outer global variables
send global variables from the parent package to the child package. If a global variable
exists in the child package, DTS updates the child's global variable to the parent's
value. If the global variable doesn't exist in the child package, DTS creates it.
</Quote>
It would *seem* that my understanding of this is accurate. Though, clearly I'm still
doing something wrong...
"John Peterson" <j0hnp@.comcast.net> wrote in message
news:OvKJxQFTEHA.2692@.TK2MSFTNGP09.phx.gbl...
> A better question might be, what exactly do the two tabs do? That is, if I want to
> propagate my out (caller) package's GVs to the inner (callee), do I do that from the
Outer
> Package tab? Or should that be done from the Inner Package tab?
>
> "John Peterson" <j0hnp@.comcast.net> wrote in message
> news:eyt8UOFTEHA.2692@.TK2MSFTNGP09.phx.gbl...
> > Thanks Uri...however, it *seems* like it's not working correctly in my case. :-(
> >
> >
> > "Uri Dimant" <urid@.iscar.co.il> wrote in message
> > news:O3NZtGFTEHA.2944@.tk2msftngp13.phx.gbl...
> > > John
> > > I think you will be better to put the question to DTS.newsgroup and also
> > > look at www.sqldts.com .
> > >
> > > Personally , I have been calling DTS Package from stored procedure which is
> > > accepted a parameter for GV.
> > >
> > >
> > > "John Peterson" <j0hnp@.comcast.net> wrote in message
> > > news:OSDjL$ETEHA.2480@.TK2MSFTNGP10.phx.gbl...
> > > > (SQL Server 2000, SP3a)
> > > >
> > > > Hello all!
> > > >
> > > > I have a DTS package, that I'll call "A", which calls another package "B".
> > > In A's Global
> > > > Variable (GV) space, I'm defining the following variables:
> > > >
> > > > SourceServer
> > > > SourceDatabase
> > > > SourceUser
> > > > SourcePassword
> > > > DestinationServer
> > > > DestinationDatabase
> > > > DestinationUser
> > > > DestinationPassword
> > > >
> > > > I also define these same GVs in B.
> > > >
> > > > I have A define the values for the GVs and I believe that they should
> > > "propagate" to B by
> > > > placing these variables in the "Outer Package Global Variables" tab.
> > > >
> > > > However, when I try to change a value from A, it's like B "remembers" the
> > > last successful
> > > > value that was used (it's not picking up the changed value).
> > > >
> > > > Am I doing something wrong with respect to GVs and packages calling other
> > > packages?
> > > >
> > > > Thanks!
> > > >
> > > > John Peterson
> > > >
> > > >
> > >
> > >
> >
> >
>