Solved

Trapping DTS Failure with workflows

Posted on 2002-07-21
7
2,432 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
Edgartown IT Case Study

Learn about Edgartown's quest to ensure the safety and security of the entire town's employee and citizen data. Read the case study!

 
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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…
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
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…
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.

726 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