Solved

Creating XML via SQL Server and receive error with larger dataset

Posted on 2014-04-11
3
222 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
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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
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…
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

786 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