Re: What is fastest way to insert many records into a SQL server database?

From: Danny Smith (dansmithyNO_SPAM_at_hotmail.com)
Date: 04/21/04


Date: Wed, 21 Apr 2004 09:55:31 +0100

Thanks Clint.

To use OPENXML do I have to output an XML file to be imported by SQL Server
(in much the same way as the BULK INSERT method) or is there a way to create
the XML file in memory and send the stream directly?

Danny

"Clint Hill" <clint_hill@msn.com> wrote in message
news:B3359562-A4D7-4D30-8200-BFBC39E92B5E@microsoft.com...
> OPENXML is your best bet. Just as fast as BCP in all of my experiences.
Better yet, you can conditionalize your inserts and updates.



Relevant Pages

  • Re: HOW I CAN SAVE AN XML IN SQL SERVER
    ... Do you want to shred it into rows/columns or store it as blob? ... If you want to shred it, you may use OpenXML or Dataset. ... consider using Bulkload which will stream the date to SQL server. ... >I HAVE AN APP THAT RECEIVE FROM THE WEB A XML FILE ...
    (microsoft.public.sqlserver.xml)
  • Re: What is fastest way to insert many records into a SQL server database?
    ... To use OPENXML do I have to output an XML file to be imported by SQL Server ... > BULK INSERT is probably fastest way in most cases. ...
    (microsoft.public.dotnet.framework.adonet)
  • Capturing Invalid Records for XML Inserts
    ... I'm new to Xml inserts into sql server. ... I've used "OpenXML" ... to conduct an insert for single rows. ... capture invalid records from the bulk insert, ...
    (microsoft.public.sqlserver.xml)
  • Import XML file into SQL Server
    ... I need to import data from XML file into SQL Server Table. ... Is there any way to do via DTS or Bulk Insert? ...
    (microsoft.public.sqlserver.dts)
  • XML file to SQL Server table - best way?
    ... We'd like to get the results out of the XML file and get them into a table ... As far as I know the software on the testers does not have ... the ability to directly transfer the data into SQL server. ... location the SQL server can 'see' so it can access and parse the file. ...
    (microsoft.public.sqlserver.xml)