473,651 Members | 2,987 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

OPENXML vs BCP

Hi,
My application writes data into sql server.

Currently it converts data into XML (an in memory XML string) and write
using OPENXML.

I want to know if i write it to a csv file and use BCP, then will it be
faster then OPENXML. (i feel, writing to a csv will create IO operation that
will slow down the process).

Thanks
Oct 3 '05 #1
1 2443
If you have many records, I would expect BCP to be much faster. The fastest
way to import large amounts of data into SQL Server is using a bulk insert
technique like BCP.

If your data originates as XML, you might also check out XML Bulk Load. See
http://msdn.microsoft.com/library/de...kload_7pv0.asp

--
Hope this helps.

Dan Guzman
SQL Server MVP

"Sandy" <a@a.com> wrote in message news:dh******** @netnews.net.lu cent.com...
Hi,
My application writes data into sql server.

Currently it converts data into XML (an in memory XML string) and write
using OPENXML.

I want to know if i write it to a csv file and use BCP, then will it be
faster then OPENXML. (i feel, writing to a csv will create IO operation
that
will slow down the process).

Thanks

Oct 3 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
7752
by: JM | last post by:
I have a SP set up to take an input param and then fire the following sp_xml_preparedocument OPENXML (With a select statement) sp_xml_removedocument This works fine with the XML syntax that microsoft provides in its documentation ... <ROOT>
1
2672
by: jrd | last post by:
The below code is only pulling the outcome_id value, but is pulling back null for the other fields in the xml string, any ideas on what is going on? -- Prepare xml data to be transfered into an xml table in sql server DECLARE @xmlTable varchar(8000) DECLARE @DocHandle int select @xmlTable = '<DATA><xmlRow outcome_id="35" dt_outcome="12/1/2004" patient_regimen_id="21" regimen_id="2" record_type="existing" /></DATA>'
2
1647
by: Bostonasian | last post by:
I've got thousands of XML docs and have to import those to the DB. And I am having problem with getting some values because of tricky XML format. I didn't create this XML format and I don't like this format, OOP snob did. And I(DBA) have to look after their mess. I've got XML doc like this : <customer> <customer_id>12345</customer_id> <first_name>Jason</first_name>
0
2804
by: Micke | last post by:
On a code behing page to an aspx page I want to open a xml file in Excel and save it as an Excel file. I have following code that is working: Dim oExcel As New Excel.Application Dim oBook As Excel.Workbook oBook = oExcel.Workbooks.OpenXML("C:\Test.xml") Now I want to apply the stylesheet Test.xsl defined in the XML file as: <?xml-stylesheet type='text/xsl' href='Test.xsl'?>
1
2171
by: figital | last post by:
I am researching the use of OpenXml for doing mass updates/inserts. Does anyone know how this procedure works as far as sql injection is concerned? I've always been taught to use sp's with parameters...does using OpenXML open up any holes in that idea? My thinking is that it would be fine (maybe even better), because the fields will still be treated as literals. Alternatively, are there any other suggestions for doing massive
2
3701
by: Shilpa | last post by:
Hi All, I want to pass XML and the data in the XML should be stored in the tables of the database. However, I do not want to use the OpenXML statement. Please let me know. Regards, Shilpa
9
6724
by: anupamjain | last post by:
Hi, After 2 weeks of search/hit-and-trial I finally thought to revert to the group to find solution to my problem.(something I should have done much earlier) This is the deal : On a JSP page, I want to grab a URL and parse /change the HTML and send it to the JSP page. I take the URL from the user in a textbox (not the
1
2561
by: yingwen | last post by:
I have a xml similar like this: <Member ID="123"> <DateBorrowed>11-01-2006</DateBorrowed> <Book ID="222" Title="ABC"> <Category> Fiction</Category> </Book> <Book ID="333" Title="ABu">
5
20697
by: emsik1001 | last post by:
I'm trying to upload XML into SQL Server 2000. I've never used openxml and I'm struggling with it. Below is the procedure with data. DECLARE @idoc int DECLARE @doc varchar (1000) SET @doc =' <Root> <MajorFamily>
0
8361
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8278
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
8466
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6158
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5615
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4144
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2701
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1912
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1588
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.