Abort execution of a DTS package

Abort execution of a DTS package

Post by Srin » Sat, 31 May 2003 09:16:55



Hi all,
Based upon a value in a status table i want to abort the
execution of a DTS package from within that package. How
do i accomplish this?
Srini.
 
 
 

Abort execution of a DTS package

Post by Allan Mitchel » Sat, 31 May 2003 16:10:47


Hello, Srini!

Unless you have executed the package through a tool such as VB and are able
to get at the pbCancel parameter I do not thiink you can stop the package
(Short of killing the process.)

--

Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org

: Hi all,
: Based upon a value in a status table i want to abort the
: execution of a DTS package from within that package. How
: do i accomplish this?
: Srini.
      ---  Microsoft CDO for Windows 2000

 
 
 

Abort execution of a DTS package

Post by Sanjee » Sun, 01 Jun 2003 10:09:39


You can use DTS global variables which can be updated
based on the Status.

Then use ActiveX / VB script to stop executing rest of the
steps in the DTS based upon value of the global variable.

Thanks..

Quote:>-----Original Message-----
>Hello, Srini!

>Unless you have executed the package through a tool such
as VB and are able
>to get at the pbCancel parameter I do not thiink you can
stop the package
>(Short of killing the process.)

>--

>Allan Mitchell (Microsoft SQL Server MVP)
>MCSE,MCDBA
>www.SQLDTS.com
>I support PASS - the definitive, global community
>for SQL Server professionals - http://www.sqlpass.org

>: Hi all,
>: Based upon a value in a status table i want to abort the
>: execution of a DTS package from within that package. How
>: do i accomplish this?
>: Srini.
>      ---  Microsoft CDO for Windows 2000

>.

 
 
 

Abort execution of a DTS package

Post by Allan Mitchel » Sun, 01 Jun 2003 17:32:05


Hello, Sanjeev!

A cute idea.

For this though you would have to have a step in between every other step
read from somewhere (DB, INI File) to see the current value of the variable.
Based on that you could then divert the execution to a stop.

1.  This would not be able to stop a task mid flow
2.  You would need to watch for inconsistent data. (Parent records with no
children)
3.  You would need to decide if a package was aborted whether to roll it all
back (Could be difficult if you use AX Script tasks)
4.  If you did not do 3 then you would need to know where to start the
package from next time, remembering that if you stop it ater populating
parents and resume on the Child populations then you may have children now
that you haven't loaded the parents for.

--

Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org

: Then use ActiveX / VB script to stop executing rest of the
: steps in the DTS based upon value of the global variable.

: Thanks..

Quote:??>> -----Original Message-----

??>> Hello, Srini!
??>>
??>> Unless you have executed the package through a tool such
: as VB and are able
??>> to get at the pbCancel parameter I do not thiink you can
: stop the package
??>> (Short of killing the process.)
??>>
??>> --
??>>
??>> Allan Mitchell (Microsoft SQL Server MVP)
??>> MCSE,MCDBA
??>> www.SQLDTS.com
??>> I support PASS - the definitive, global community
??>> for SQL Server professionals - http://www.sqlpass.org
??>>
??>> : Hi all,
??>> : Based upon a value in a status table i want to abort the
??>> : execution of a DTS package from within that package. How
??>> : do i accomplish this?
??>> : Srini.
??>>      ---  Microsoft CDO for Windows 2000
??>>
      ---  Microsoft CDO for Windows 2000