Friday, March 30, 2012

job to read the zip file and insert db

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?
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

No comments:

Post a Comment