Solved

Writing  large xml file -  memory issue

Posted on 2011-03-13
3
504 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
  • 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

Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

Question has a verified solution.

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

Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

911 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

Need Help in Real-Time?

Connect with top rated Experts

25 Experts available now in Live!

Get 1:1 Help Now