Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Data Transformation Services Question

Status
Not open for further replies.

tlaksh

Programmer
Feb 25, 2001
98
US
I am new to SQL and this may probably be a basic question abt DTS. I have a DTS job scheduled that converts data from a text file and appends records to a table. The text file gets data by running a batch file at regular intervals. I noticed that I could schedule for the batch file to run before the DTS jobs. But is there a way by which I can then delete the text file once records are inserted into the table.
If so please help.

I need to do this because I am collecting eventlog information from NT servers into text files and storing them into SQL table. I use the dumpevt utility to pick up eventlog data into text files. The dumpevt utility overwrites the text file if any new information has been added to the error log after the last update but if there is not new data in the eventlog it holds the old info in the text file.

Now the problem arises if DTS is run during this period, it would insert a duplicate record in the table. So i need to delete the text file once the data is inserted in the table.

Also can anyone tell me where I can get info abt all the options in DTS. I am using SQL 7.0.

Thanks a ton:).

Lakshmi.
 
At the end of your DTS job or SQL Server Agent job you can add a step that is an "operating system command"; this step would be used to erase or rename the file. Be sure that you only move to this step "on success" of the previous step. Robert Bradley
teaser.jpg

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top