dbTalk Databases Forums  

Cancel a Task

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


Discuss Cancel a Task in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Gary Spence
 
Posts: n/a

Default Cancel a Task - 07-08-2004 , 05:26 AM






My DTS package consists of two tasks, one... to transfer the data and two... to delete the data at the data source if the first task was successful, how can i cancel the first task if the deletion task is unsuccessful, i'm sending the same data twice because the first is allowed to retrieve the data but the second task can't delete the data because the table is locked.
Any better solutions or processes always welcomed
Much obliged

Reply With Quote
  #2  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: Cancel a Task - 07-08-2004 , 05:45 AM






You do not cancel the task you use workflow constraints.

Introduction to Workflow
(http://www.sqldts.com/default.aspx?287)

--

----------------------------

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


"Gary Spence" <GarySpence (AT) discussions (DOT) microsoft.com> wrote

Quote:
My DTS package consists of two tasks, one... to transfer the data and
two... to delete the data at the data source if the first task was
successful, how can i cancel the first task if the deletion task is
unsuccessful, i'm sending the same data twice because the first is allowed
to retrieve the data but the second task can't delete the data because the
table is locked.
Quote:
Any better solutions or processes always welcomed
Much obliged



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

Default Re: Cancel a Task - 07-08-2004 , 04:06 PM



In message <68F7F449-6378-43BD-A781-81BDDDCB3258 (AT) microsoft (DOT) com>, Gary
Spence <GarySpence (AT) discussions (DOT) microsoft.com> writes
Quote:
My DTS package consists of two tasks, one... to transfer the data and
two... to delete the data at the data source if the first task was
successful, how can i cancel the first task if the deletion task is
unsuccessful, i'm sending the same data twice because the first is
allowed to retrieve the data but the second task can't delete the data
because the table is locked.
Any better solutions or processes always welcomed
Much obliged
What is locking the table or blocking the delete? Find the cause and fix
it or test for it first and abort the package before copying the data?

Or

Add some form of logic that keeps track of what has been transferred and
what hasn't to determine the source filter for the transfer. How easy
this is depends on your PK type and generation mechanism.

Or

If you need to ensure that the two tasks run as one transaction then you
can do this in DTS by setting up a package transaction. See Books Online
for more details about using transactions.

--
Darren Green (SQL Server MVP)
DTS - http://www.sqldts.com

PASS - the definitive, global community for SQL Server professionals
http://www.sqlpass.org



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.