Solved

Trapping DTS Failure with workflows

Posted on 2002-07-21
7
2,441 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
What Is Transaction Monitoring and who needs it?

Synthetic Transaction Monitoring that you need for the day to day, which ensures your business website keeps running optimally, and that there is no downtime to impact your customer experience.

 
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 100 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

Comparison of Amazon Drive, Google Drive, OneDrive

What is Best for Backup: Amazon Drive, Google Drive or MS OneDrive? In this free whitepaper we look at their performance, pricing, and platform availability to help you decide which cloud drive is right for your situation. Download and read the results of our testing for free!

Question has a verified solution.

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

Everyone has problem when going to load data into Data warehouse (EDW). They all need to confirm that data quality is good but they don't no how to proceed. Microsoft has provided new task within SSIS 2008 called "Data Profiler Task". It solve th…
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Via a live example, show how to shrink a transaction log file down to a reasonable size.

717 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