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

How to Stall Next Step

Status
Not open for further replies.

dpgirl

Technical User
Apr 5, 2005
45
US
In my DTS package, I have a step that zips a file in a certain directory and another step that places the zipped file on the ftp. The 2nd step occurs upon completion of the 1st step. When I run the package, it runs fine. However, when I download the file from the ftp site and try to unzip it, I get an error message that not all the records were successfully zipped. But, when I go back to the original zipped file that was saved to the directory (before upload to ftp), this file opens up fine and doesn't produce an error. My theory is that, because the DTS steps execute so quickly upon receiving a "completion" signal, that this is causing the DTS package to place the file on the ftp site before the file is truly done zipping.

I'd like to test out this theory by purposely creating a 30-second delay from the time the zip step is completed to the time the ftp step is initiated. Would anyone have any thoughts on how I could possibly do this? Thanks!
 
Google for wait.exe. It's a command line app that you can pass a number of seconds to, and it will simply wait until the number of seconds has passed then exit.

Denny
MCSA (2003) / MCDBA (SQL 2000)
MCTS (SQL 2005 / Microsoft Windows SharePoint Services 3.0: Configuration / Microsoft Office SharePoint Server 2007: Configuration)
MCITP Database Administrator (SQL 2005) / Database Developer (SQL 2005)

--Anything is possible. All it takes is a little research. (Me)
[noevil]
 
How about creating a step that runs this query...

waitfor delay '0:0:30'

Hint: Open Query Analyzer, copy/paste this code, and see how long it takes to run.

-George

Strong and bitter words indicate a weak cause. - Fortune cookie wisdom
 
While that would also work, why connect to the SQL Server to perform such a low level task when you don't have to.

I prefer to have the OS deal with stuff like this.

Denny
MCSA (2003) / MCDBA (SQL 2000)
MCTS (SQL 2005 / Microsoft Windows SharePoint Services 3.0: Configuration / Microsoft Office SharePoint Server 2007: Configuration)
MCITP Database Administrator (SQL 2005) / Database Developer (SQL 2005)

--Anything is possible. All it takes is a little research. (Me)
[noevil]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top