Solved

Trapping DTS Failure with workflows

Posted on 2002-07-21
7
2,427 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
  • 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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
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

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

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

Nowadays, some of developer are too much worried about data. Who is using data, who is updating it etc. etc. Because, data is more costlier in term of money and information. So security of data is focusing concern in days. Lets' understand the Au…
When you hear the word proxy, you may become apprehensive. This article will help you to understand Proxy and when it is useful. Let's talk Proxy for SQL Server. (Not in terms of Internet access.) Typically, you'll run into this type of problem w…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

825 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