Solved

Trapping DTS Failure with workflows

Posted on 2002-07-21
7
2,421 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
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 
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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Performance is the key factor for any successful data integration project, knowing the type of transformation that you’re using is the first step on optimizing the SSIS flow performance, by utilizing the correct transformation or the design alternat…
Introduction SQL Server Integration Services can read XML files, that’s known by every BI developer.  (If you didn’t, don’t worry, I’m aiming this article at newcomers as well.) But how far can you go?  When does the XML Source component become …
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 extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.

707 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now