Solved

DTS Package Error Handling

Posted on 2006-10-25
8
311 Views
Last Modified: 2013-11-30
I am writing a vbscript active script to generate some files.  I would like to stop the creation of file when it encounters an error. Are there any examples of that anybody can share with me?  Right now what happens is that it creates the file (probably in the middle) and then stops the DTS package...  I would like to stop if from creating the file at all...  I may have to move the save file code to somewhere else...
0
Comment
Question by:RVattakunntel
  • 4
  • 2
  • 2
8 Comments
 
LVL 10

Expert Comment

by:AaronAbend
Comment Utility
I think you can set up a workflow "failure" step and go from that step on failure and take action as needed. Sorry I cannot even open my old dts packages since upgrading to 2005.
0
 

Author Comment

by:RVattakunntel
Comment Utility
ok.  I have a sendmail task if the active x script fails but I want to fail the dTS package if certain error occurs.
0
 
LVL 10

Expert Comment

by:AaronAbend
Comment Utility
I suggest deleting the file in the process that fires when it fails... there should be a way to do that in activex. You may have to create a DOS command and RUN it or something like that.
0
 
LVL 75

Expert Comment

by:Anthony Perkins
Comment Utility
If there is an error the file is not created.
0
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 

Author Comment

by:RVattakunntel
Comment Utility
That is not a bad idea to delete the file when an error occurs.  Any examples of vbscript in doing that?
0
 
LVL 10

Expert Comment

by:AaronAbend
Comment Utility

set oFile = oFSO.GetFile(sFilename)
oFile.Delete(True)

I think this does it
0
 
LVL 10

Accepted Solution

by:
AaronAbend earned 250 total points
Comment Utility
wrong ... check this out

http://www.sqlservercentral.com/columnists/hji/usingvbscripttoautomatetasks.asp

(without access to dts any more it is hard to help.. but for that same reason, I know there are not many dts guys left out there so I am just trying to help as much as I can)
0
 
LVL 75

Assisted Solution

by:Anthony Perkins
Anthony Perkins earned 250 total points
Comment Utility
Or simply:

Dim FSO
Set FSO = CreateObject("Scripting.FileSystemObject")
FSO.DeleteFile "YourFileNameGoesHere", True
Set FSO = Nothing
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Suggested Solutions

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…
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…
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
Viewers will learn how the fundamental information of how to create a table.

763 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

11 Experts available now in Live!

Get 1:1 Help Now