Solved

Writing  large xml file -  memory issue

Posted on 2011-03-13
3
510 Views
Last Modified: 2012-05-11
I have a large datatable in sql server 2000 with xml code for each row in ntext field.
(about 500000 rows) My normal strategy is to loop through the rows in batch sizes and add the xml elements to a xmldocument in memory and then do xmldocument.save.
In this case it runs out of ram.
Any suggestions how to split this process?
0
Comment
Question by:duke63
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 52

Accepted Solution

by:
Carl Tawn earned 500 total points
ID: 35126592
I think you are going to need to resort to using an XmlWriter, rather than an XmlDocument. This should help you get started:

    http://msdn.microsoft.com/en-us/library/wkee9k2s(v=vs.71).aspx

   
0
 

Author Comment

by:duke63
ID: 35126818
OK, I'll give it a try. Think xmlwriter.flush is what I need.
0
 

Author Comment

by:duke63
ID: 35128971
Works great and fast, thanks!!
0

Featured Post

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
push and Pull replication 31 48
SQL Get Store Procedure Column Name As Row 5 41
Access #Deleted data 20 43
XSLT Title Character Truncation and xsl:choose Option 8 19
Browsing the questions asked to the Experts of this forum, you will be amazed to see how many times people are headaching about monster regular expressions (regex) to select that specific part of some HTML or XML file they want to extract. The examp…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question