?
Solved

Trapping DTS Failure with workflows

Posted on 2002-07-21
7
Medium Priority
?
2,446 Views
Last Modified: 2013-11-30
Greetings,

I have created a DTS package that checks for the existance of a file in a directory (using an ActiveX script task), by returning DTSTaskExecResult_Success or DTSTaskExecResult_Failure.

On Success the rest of the processing carries on successfully, and on failure (no file exists) I go to another ActiveX script task which just reutrns DTSTaskExecResult_Success and the execution should end there.  When I run it in both Enterprise Mgr and as a scheduled job, it throws the error.  When I run it in EM the first step fails and and then it jumps to the failure task  which completes successfully.  What I don't understand about it is why does the execution results display an error when I have allowed for that in the workflow??

Whilst being familiar with DTS I don't use it that often so perhaps I and missing out some basic stuff.  Or is this just standard behaviour for DTS.......  I have attached the error message I get from the scheduled job as well.

Executed as user: SNYDEV\SDVSQL01Starter. DTSRun:  Loading...   DTSRun:  Executing...   DTSRun OnStart:  DTSStep_DTSActiveScriptTask_1   DTSRun OnError:  DTSStep_DTSActiveScriptTask_1, Error = -2147220421 (8004043B)      Error string:  The task reported failure on execution.      Error source:  Microsoft Data Transformation Services (DTS) Package      Help file:  sqldts80.hlp      Help context:  1100      Error Detail Records:      Error:  -2147220421 (8004043B); Provider Error:  0 (0)      Error string:  The task reported failure on execution.      Error source:  Microsoft Data Transformation Services (DTS) Package      Help file:  sqldts80.hlp      Help context:  1100      DTSRun OnFinish:  DTSStep_DTSActiveScriptTask_1   DTSRun OnStart:  DTSStep_DTSActiveScriptTask_3   DTSRun OnFinish:  DTSStep_DTSActiveScriptTask_3   DTSRun:  Package execution complete.  Process Exit Code 1.  The step failed.
0
Comment
Question by:barx
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
7 Comments
 
LVL 2

Expert Comment

by:PUMASOFT
ID: 7169086
In the package properties itself (in design mode - righ click on white space and select properties), there are a number of tabs, on one of them is an option to fail package on first failure - has this option been set?
0
 
LVL 1

Author Comment

by:barx
ID: 7169271
PUMASOFT, I checked that and it wasn't set.
0
 
LVL 2

Expert Comment

by:PUMASOFT
ID: 7169302
I think it needs to be, and your first Activex where it checks for the file and it doesnt exist should return DTSTaskExecResult_Failure - the DTS will then stop on this task - you do not need anything further after this - yo0u know that the file does not exist because the package has failed on the particular task.
0
Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

 
LVL 1

Author Comment

by:barx
ID: 7179343
Sorry, for the delay in getting back to you PUMASOFT

But I don't want the actual package to fail execution because the file doesn't exist.  If the package fails then the SQL scheduler returns a failed job, not the result I want.  Just because the file doesn't exist there doesn't mean I want the package to throw an error, I just want it to do nothing and return successful.  If it does find the file then it executes the import logic.  If there is any problems with the import logic then I want the package to fail, not there is no file.
0
 
LVL 2

Accepted Solution

by:
PUMASOFT earned 400 total points
ID: 7193356
You could allow one failure on the package in properties in the workflow properties you can direct to another task on failure - you can have upto three workflows for a task - on failure, on success and on completion - can you use these to redirect the flow?
0
 

Expert Comment

by:CleanupPing
ID: 9280086
barx:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0
 
LVL 1

Author Comment

by:barx
ID: 9283279
Sorry I didn't finalise this before.

Not sure if PUMASOFT's answer actually worked (it was over a year ago).

Seeing as PUMASOFT put the effort in to try and answer it I'll give the points anyway.

Cheers,
Alan
0

Featured Post

Percona Live Europe 2017 | Sep 25 - 27, 2017

The Percona Live Open Source Database Conference Europe 2017 is the premier event for the diverse and active European open source database community, as well as businesses that develop and use open source database software.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…
Suggested Courses

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question