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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

checking connection before running dts 1

Status
Not open for further replies.

CorbinMyMan

Technical User
Feb 4, 2005
267
US
I'm somewhat new to advanced DTS packages, but I have one now that does the following:

It pulls data using an odbc driver, and puts that data in a sql table, but not before deleting the table (to prevent dupes in the sql table). My problem is the first thing it does is delete the table, and then connects to the source and transfers data to the destination. But what happens if it can't make a connection to my source? It still deletes the table and i'm left with no data because it deleted it all first. What I'd like to make it do is if the source connection is Successfull, THEN delete the sql table, THEN transfer the data. If the source connection is NOT successfull, then i want it to stop executing the package (and of course log the reason why it coudln't connect)

I've messed with the package for hours and can't quite figure it out.

Please help! And thank you in advance for ANY help directed at me.
 
You've got a few options.

Based on your description of the problem I'm assuming that you are pulling data from another database.

Before you pull the data accross execute a query on that server say a "select top 1 * from table". If the query runs then you'll know that the server is working. If this query fails then don't execute the transfer.

Denny
MCSA (2003) / MCDBA (SQL 2000)

--Anything is possible. All it takes is a little research. (Me)
[noevil]
 
Awesome. That made sense :)

And it worked perfectly!

Thank you!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top