Unix Technical Forum

Loading Flat File using DTS

This is a discussion on Loading Flat File using DTS within the SQL Server forums, part of the Microsoft SQL Server category; --> I want to use DTS to load from a flat file. But I can't be sure when the flat ...


Go Back   Unix Technical Forum > Database Server Software > Microsoft SQL Server > SQL Server

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-29-2008, 08:48 AM
amorphous999
 
Posts: n/a
Default Loading Flat File using DTS

I want to use DTS to load from a flat file. But I can't be sure when
the flat file will arrive. I would like the job to check every 10
minutes or so for a couple of hours. If the file is present, then load
the file and rename it so that it doesn't get overwritten. Any
suggestions?

TIA,

amorphous999

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-29-2008, 08:48 AM
TLetsek
 
Posts: n/a
Default Re: Loading Flat File using DTS

Why not create the DTS package as if the file exists, and if it doesn't let
the package fail!
Set up a job to run the package every x number of minutes, if the file is
there it will load
if the file's not there the package will fail and the job will execute again
in another x minutes.

Of course the last step of your package will be to delete the file after it
loads, so it doesn't
keep appending the info to the database.

We have several similar packages we run and just let them fail when the
file's not there, not
very pretty but who cares! It works and the import only takes 10 seconds
anyway.

"amorphous999" <jfobrien1458@hotmail.com> wrote in message
news:1117744931.123546.5010@o13g2000cwo.googlegrou ps.com...
> I want to use DTS to load from a flat file. But I can't be sure when
> the flat file will arrive. I would like the job to check every 10
> minutes or so for a couple of hours. If the file is present, then load
> the file and rename it so that it doesn't get overwritten. Any
> suggestions?
>
> TIA,
>
> amorphous999
>



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-29-2008, 08:48 AM
Simon Hayes
 
Posts: n/a
Default Re: Loading Flat File using DTS

You could put in an ActiveX step to check if the file is there - if it
is, the package continues, if not, then it returns, quits, logs an
error or anything else you want it to do. This article might be useful:

http://www.sqldts.com/default.aspx?292

Simon

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-29-2008, 08:49 AM
amorphous999
 
Posts: n/a
Default Re: Loading Flat File using DTS

Thanks for the URL! I'll give it a try.

Simon Hayes wrote:
> You could put in an ActiveX step to check if the file is there - if it
> is, the package continues, if not, then it returns, quits, logs an
> error or anything else you want it to do. This article might be useful:
>
> http://www.sqldts.com/default.aspx?292
>
> Simon


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 12:26 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com