SurfingMoose


*Newbie Alert - Non-Programmer*

I have over 100 thousand XML docs in a zip archive to upload to SQL Server 2005. My question is how to go about this and what is practical I've read a couple of posts using some sort of loop but it seems slow and I don't want to unzip the archive. I would want each doc as an individual record and whole and not shredded.

Any info would be greatly appreciated.

Thanks

SurfingMoose



Re: Zip archive of XML docs loading into SQL Server

SurfingMoose


No reply yet

Is what I'm asking possible

SurfingMoose





Re: Zip archive of XML docs loading into SQL Server

MRys

You will have to unzip it since SQL Server does not understand ZIP files. then you have to write some script (maybe using SSIS or VB ) to loop over the files and load them into the database. You pass the content of the files to a stored procedure parameter (or T-SQL statement) as the appropriate type (ie. SqlXML type in ADO.Net if the file contains XML data). The stored proc contains a simple INSERT statement (the data will be inserted and parsed as needed).

Best regards

Michael

PS: And yes, it requires some programming.







Re: Zip archive of XML docs loading into SQL Server

SurfingMoose

Thanks Michael for the response. I was hoping that I wouldn't need to unzip the archive.

Mario