Friday, March 30, 2012
job to read the zip file and insert db
I need to grab the zip file on ftp server periodically,
and the zip file contains one text file, then I need to
insert the records into db, Iwould like to automate the
process. How can set it up?
ThanksHi,
Try using pkunzip and BCP IN utilities to perform this.
Thanks
Hari
MCDBA
"Jen" <anonymous@.discussions.microsoft.com> wrote in message
news:0f2101c3b476$4bfeb470$a001280a@.phx.gbl...
> Hi,
> I need to grab the zip file on ftp server periodically,
> and the zip file contains one text file, then I need to
> insert the records into db, Iwould like to automate the
> process. How can set it up?
> Thanks|||Jen,
You can use wzunzip.exe (WinZip command-line) to unzip the file. You can use
ftp -s <filename> to script the ftp (or use something like www.webdrive.com to
make the ftp server look like an NT drive). You can use bcp.exe or bulk insert
or dts to insert the records.
Pull it all together with a few lines of batch file.
> I need to grab the zip file on ftp server periodically,
> and the zip file contains one text file, then I need to
> insert the records into db, Iwould like to automate the
> process. How can set it up?
> Thanks
>
Neil Pike MVP/MCSE. Protech Computing Ltd
Reply here - no email
SQL FAQ (484 entries) see
http://forumsb.compuserve.com/gvforums/UK/default.asp?SRV=MSDevApps
(faqxxx.zip in lib 7)
or www.ntfaq.com/Articles/Index.cfm?DepartmentID=800
or www.sqlserverfaq.com
or www.mssqlserver.com/faq
Wednesday, March 21, 2012
Job is not executing in parallel
I created the package to download 4 ftp files at once.
I set the MaxConcurrentExecutables for the SSIS package to 4. So in BIDS in downloads 4 files at the same time.
However, when I started the job I noticed that only 3 files were downloaded at the time (looking at temp files in download directory)
Solution:
Sure enough after digging around for awhile - in Step properties for SSIS package - there is execution tab - and "Maximum Concurrent Executables" was -1 (which for some reason defaults to 3 concurrent processes even on our dual CPU server) - so after chanign that value to 4 - tada - all 4 files in parallel
I found 2 different versions about the behavior of SSIS when the default value of MaxConcurrentExecutables property is used.
If you look at BOL (http://msdn2.microsoft.com/en-us/library/ms137749.aspx) it says :"The number of executable files that the package can run concurrently. The default value of this property is -1, which indicates that there is no limit."
But if you look at 'Integration Services: Performance Tuning Techniques' white paper (http://www.microsoft.com/technet/prodtechnol/sql/2005/ssisperf.mspx); it says "By default, this is set to -1, which translates to the number of logical machine processors plus 2. "
However, any of these 2 descriptions seems to be consistent with what you are describing. I belive the second version is closer to the true; but It would be interesting to get a confirmation of that.
Rafael Salas