Solved

DTS Package Error Handling

Posted on 2006-10-25
8
313 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
ID: 17808247
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
ID: 17808251
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
ID: 17808276
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
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

 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 17808278
If there is an error the file is not created.
0
 

Author Comment

by:RVattakunntel
ID: 17808284
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
ID: 17808335

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

I think this does it
0
 
LVL 10

Accepted Solution

by:
AaronAbend earned 250 total points
ID: 17808346
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
ID: 17808354
Or simply:

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

Featured Post

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.

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…
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 backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

810 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