Solved

Creating XML via SQL Server and receive error with larger dataset

Posted on 2014-04-11
3
220 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
3 Comments
 
LVL 142

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 500 total points
Comment Utility
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
Comment Utility
Please post the relevant section of your code, but I suspect Guy is right on this.
0
 

Author Closing Comment

by:Alyanto
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
If you have heard of RFC822 date formats, they can be quite a challenge in SQL Server. RFC822 is an Internet standard format for email message headers, including all dates within those headers. The RFC822 protocols are available in detail at:   ht…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

743 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

14 Experts available now in Live!

Get 1:1 Help Now