Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Import/Export (DTS) and Replication (2000)
 DTS - Skip tasks

Author  Topic 

samsekar
Constraint Violating Yak Guru

437 Posts

Posted - 2004-08-13 : 04:30:24
I need to skip some of the tasks in a DTS package based on failure condition of a specific task. For example as shown below if the task3 fails it will go to Task8 from there I need to call task6.. So that I can skip the task4 and task5.

Iam using MSSQL 7.0
Any help is highly appreciated.

T1-->T2-->T3-->T4-->T5-->T6-->T7
...............|
...............|
...............T8

- Sekar

mwjdavidson
Aged Yak Warrior

735 Posts

Posted - 2004-08-13 : 06:11:17
Hi
Just to be clear, have you tried using precedence constraints and found them insufficiently flexible?


Mark
Go to Top of Page

samsekar
Constraint Violating Yak Guru

437 Posts

Posted - 2004-08-13 : 06:14:48
Yes. I have tried. The problem is if you have more than one precedence for a task then that task would execute only if all the precedence tasks are executed.



- Sekar
Go to Top of Page

mwjdavidson
Aged Yak Warrior

735 Posts

Posted - 2004-08-13 : 06:53:42
I Thought that was probably the case...
Off the top of my head, the only way I can think to do this is with ActiveX scripts controlling the flow via the Step object's DisableStep property.

Mark
Go to Top of Page

samsekar
Constraint Violating Yak Guru

437 Posts

Posted - 2004-08-13 : 07:19:40
Hi Mark,
I am new to DTS ActiveX scripts. Can you please be so kind to help me with some sample dts scrips. Thanks.

- Sekar
Go to Top of Page

samsekar
Constraint Violating Yak Guru

437 Posts

Posted - 2004-08-13 : 09:54:52
All, There is a sample script in sqldts.com for multiple paths in workflow, but has some issue..Every first time when it chooses the TRUE/FALSE path it fails, next time it runs. Can someone please throw some light on this..

http://www.sqldts.com/default.aspx?218,1

- Sekar
Go to Top of Page

mwjdavidson
Aged Yak Warrior

735 Posts

Posted - 2004-08-13 : 11:09:22
Hi
That's a good find Sekar. It's a clever way of achieving your desired result. Fortunately, I've never had cause to go down multiple paths in a DTS workflow.
What error are you getting? It runs fine on my local 2000 server, so it looks as though it could be a SQL 7.0 thing.

Mark
Go to Top of Page

samsekar
Constraint Violating Yak Guru

437 Posts

Posted - 2004-08-13 : 11:24:17
Oh.. Infact When i selected yes/no first time the package didnt took any of the path instead it stopped in the setup task reporting succesful execution. Then when i slected yes second time the package took the path A, B, C and worked as expected. I am tring to locate the problem now, could not able to find any still!!

- Sekar
Go to Top of Page

rockmoose
SQL Natt Alfen

3279 Posts

Posted - 2004-08-13 : 19:32:46
Aaaah if they would only give us if then else logic in DTS :-)
This method of conditional branching in dts is really crap.
And the only method I know of too...

Use stored procedures :-)

/rockmoose
Go to Top of Page
   

- Advertisement -