Solved

Creating XML via SQL Server and receive error with larger dataset

Posted on 2014-04-11
3
225 Views
Last Modified: 2014-04-12
When running with less than 25,000 records the XML generation runs fine but when the data set exceeds 25K records I get this error.  Does anyone have an idea why this might be.  The location in the procedure that is said to fail changes in direct relationship to the amount of data being processed.  The structure  of the XML is as below.
<Branches>
    <Branch>
       <Stock>
          <Item Attributes..../>
          <Item Attributes..../>
       <Despatch>
          <Item Attributes..../>
          <Item Attributes..../>
          <Item Attributes..../>
       </Stock>
    </Branch>
</Branches>

Open in new window


Sometimes it fails at in Stock sometimes in Despatch.  

Msg 6833, Level 16, State 1, Procedure PI_AppendTransmissionTable_V2, Line 51
0
Comment
Question by:Alyanto
[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
3 Comments
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 500 total points
ID: 39993830
I fear I have bad news in regards to that the MS XML components are not really good for very large XML ... you will need to generate the XML outside of SQL...
listening ...
0
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 39995562
Please post the relevant section of your code, but I suspect Guy is right on this.
0
 
LVL 1

Author Closing Comment

by:Alyanto
ID: 39995761
Thanks Guy, I believe you have confirmed what I feared.  At 25k records with 4 nesting levels size is propabably the issue.  I have gone for a scripting solution  and to be honest the performance on the same data with the same structure is a vast improvement.
0

Featured Post

The Ultimate Checklist to Optimize Your Website

Websites are getting bigger and complicated by the day. Video, images, custom fonts are all great for showcasing your product/service. But the price to pay in terms of reduced page load times and ultimately, decreased sales, can lead to some difficult decisions about what to cut.

Question has a verified solution.

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

Naughty Me. While I was changing the database name from DB1 to DB_PROD1 (yep it's not real database name ^v^), I changed the database name and notified my application fellows that I did it. They turn on the application, and everything is working. A …
Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

691 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