Re: Loading XML to SLQ Server

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Bertan ARI [MSFT] (bertan_at_online.microsoft.com)
Date: 09/22/04


Date: Wed, 22 Sep 2004 00:00:30 -0700

A previous post to the newsgroup:

"In SQL Server 2000 you have two main options - using the OPENXML technology
or using the SQLXML BulkLoad technology. Choosing between these two options
is largely a matter of personal choice in terms of what technologies you
feel most comfortable with. OPENXML is a technology that runs in the server
while and requires a reasonable level of familiarity with T-SQL. SQLXML
BulkLoad runs on the client and requires no T-SQL but you need to generate
an Annotated XSD to determine the mapping between the XML and the database.
One other thing to consider is the size of the data being loaded. OPENXML
loads the entire XML into memory on the server so if you are loading large
amounts of data you may want to go with a BulkLoad solution.

You can get more information on OPENXML in SQL BOL or online at
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_oa-oz_5c89.asp

SQLXML documentation is at
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnanchor/html/anch_SQLXML.asp
or you can check out http://www.sqlxml.org/ for some extra info on these
technologies."

I should also add that if you want to develop your application by using
.Net, you may want to use Dataset as well. Dataset has also a drawback of
loading all data into memory similar to OpenXml.

-- 
Bertan ARI
This posting is provided "AS IS" with no warranties, and confers no rights.
"SqlJunkies User" <User@-NOSPAM-SqlJunkies.com> wrote in message
news:OKM$bJGoEHA.4068@tk2msftngp13.phx.gbl...
> Whats the best way to load XML into SQL Server..
> For example just a single XML file..
> thanks
>
> ---
> Posted using Wimdows.net NntpNews Component -
>
> Post Made from http://www.SqlJunkies.com/newsgroups Our newsgroup engine
supports Post Alerts, Ratings, and Searching.


Relevant Pages

  • Re: Recommendations for shredding RSS to SQL Server?
    ... In SQL Server 2000 you have two main options - using the OPENXML technology ... BulkLoad runs on the client and requires no T-SQL but you need to generate ...
    (microsoft.public.sqlserver.xml)
  • Re: Opinions on procedural language being introduced into SQL Server 2005
    ... > technology is likely to achieve the opposite. ... Software complexity is often increased by ... I like how SQL Server is doing this, in that you declare and use the objects ... Pro SQL Server 2000 Database Design ...
    (microsoft.public.sqlserver.programming)
  • Re: Have Insert statement, need equivalent Update.
    ... All the relevent openxml is there I just couldn't figure out how to ... INSERT INTO tblScanDetail (MAC, GUIID, GUIParentID, ScanAttributeID, ... FROM tblScan, tblScanAttribute JOIN #temp ON ... SQL Server, ...
    (comp.databases.ms-sqlserver)
  • Re: Have Insert statement, need equivalent Update.
    ... All the relevent openxml is there I just couldn't figure out how to ... INSERT INTO tblScanDetail (MAC, GUIID, GUIParentID, ScanAttributeID, ... FROM tblScan, tblScanAttribute JOIN #temp ON ... SQL Server, ...
    (comp.databases.ms-sqlserver)
  • Re: SQL 2005 OPENXML doesnt understand xsi:nil
    ... OpenXML operates on an untyped XML DOM tree. ... The nodesmethod in SQL Server 2005 will understand xsi:nil if you have ... DECLARE @doc VARCHAR ...
    (microsoft.public.sqlserver.xml)