November 2, 2006 at 12:56 pm
Hello,
I was looking for help in automating a DTS package.
Here is our current process:
Here is what I want:
The package runs if a new file is inserted into the directory on the network or new files are imported every 2 hours from that directory.
If someone could point me into the right direction, I should be ok.
Thanks,
James
November 2, 2006 at 2:36 pm
Well, the method for automating a DTS package usually consist of making it into a scheduled job and letting SQL Agent kick it off for you. I cannot see how you could trigger the job to run if a new file is inserted into a directory, but you could schedule the job to run every few minutes (or any increment you choose) and the job can check the directory before calling the DTS package.
November 2, 2006 at 3:34 pm
Hi James,
I found a good article about doing multiple files in a directory...
http://www.databasejournal.com/features/mssql/article.php/10894_3325731_1
But I think John's right - the best thing to do is to schedule the job up every 2 hours or so... unless you create a separate application to listen for new files in the directory.
Rob
November 2, 2006 at 10:04 pm
I would put a bat file on the server, schedule the bat file via Windows Scheduled Tasks to check for existence of new files. If new files are detected, fire off the DTS package using the DTSRun executable.
November 3, 2006 at 7:29 am
Thanks all. I'll try these different options.
James
November 4, 2006 at 9:40 pm
I recently wrote a slick SP that shells out and grabs the Directory information for a directory and loads all the details into a table. I could post that for you and others if that would help.
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply