March 14, 2002 at 11:59 pm
I'm thinking about building a custom task for zipping and unzipping files from a DTS package. I know you can pass pkzip command line options to build a zip, but this would give you a nice gui to work with and some added features not available in pkzip like error handling, logging and event handling.
Has anyone seen a utility like this already built as an Enterprise Manager / DTS plugin?
Would anyone out there use it if I built it?
Your feedback is appreciated.
Thanks,
John
March 15, 2002 at 3:02 am
If it would work for SQL Server 7.0 I would try it. I currently use a dos version of pkzip so that I can use the command line and an alternative with more features would be welcome as I've had a few inconveniences implementing the use of this version.
Robert Marda
Robert W. Marda
Billing and OSS Specialist - SQL Programmer
MCL Systems
March 15, 2002 at 4:41 am
I woul have to test it to say whether or not I would use. I tend not to use third party products unless I can find a good business case. Really depends on what it would offer that I don't currently get.
"Don't roll your eyes at me. I will tape them in place." (Teacher on Boston Public)
March 15, 2002 at 4:51 am
I think it might get used. My advice is to make it work first, then add bells and whistles!
Andy
March 15, 2002 at 10:05 am
An interesting idea, but if you did it, it'd have to be fairly compact, like only one file, otherwise you'd be asking for issues with installing this on other boxes.
Personally I like the pkzip command line because it's simple and it works, but it could use some help. You could easily build a GUI for the command line version.
Steve Jones
March 25, 2002 at 11:11 am
I do actually use this option with a few DTS job we have.
Here is the case:
Our clients work with an application called BBX (Business Basic) This one is DOS based. Every night our client server zip the BBX files and FTP to our FTP server. From there, using a task the SQL Server gets the BBX files and the DTS starts first by creating a DTS start time and then unzip the files.
You have to create an activeX step to loop while the file unzips. Otherwise, if the files are too big, the DTS times out.
OK, enough of blah blah. Here are the sample I used the first time to make sure it did work (we use WinZip, but it should be the same as PK)
1. Created a Win32 Process with the following entry
C:\WINNT\ZipUtility.exe (where ever your Zip appllication is located)
2. in the parameters box I entered
/D:\"Directoryname" /D:\Program Files\WinZip\Wzunzip.exe -s"user_&password" This user and password was used to reach the server location
Then, I created an acitveX task to loop while the file unzips
'**********************************************************************
' Visual Basic ActiveX Script
'************************************************************************
Function Main()
Dim fso
Dim folInUse
Dim filInUse
Dim strFileName
Dim datDateToCompare
Set fso = CreateObject( "Scripting.FileSystemObject" )
Set folInUse = fso.GetFolder(DTSGlobalVariables("FolderPath").Value)
For Each filInUse in folInUse.Files
If filInUse.DateCreated >datDateToCompare Then
strFileName = filInUse.Name
datDateToCompare = filInUse.DateCreated
End If
Next
DTSGlobalVariables("DateCurrent").Value = Mid( strFileName , 5 , 4 )
Main = DTSTaskExecResult_Success
End Function
It has a couple of extra lines for my own use, like creatting the date to be entered in one file, so you can skip this couple of extra lines for your own use.
There you go, I have been using this steps for almost six moths now and never had an issue with this. I had some other problem with my DTS, but not with the unzip or loop steps. Hope this helps.
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply