Parsing XML in sql server stored procedure

  • I have an XML string I need to parse into fields to be inserted into tables. I have 4 different XML strings being passed into a stored procedure to be parsed into 14 different tables. I have a large volume of XML strings being passed by a Web servers so I am getting Connection refused, Blocked and timeout errors. Currently I am able to handle 250,000 strings per hour but as volume goes above that number the errors start happening. I am using cross apply XML.nodes to parse the data from the string, is there a faster way within Sql that I need to be using. If this is the quickest way to parse XML in sql would using C# program be a better faster way to parse data into the sql tables?

  • Performance of XQuery is not always fantastic, and sometimes seemlingly trivial changes can have huge impact on performance.

    In the XML section of my article on Arrays and Lists in SQL Server I have compiled some tricks, but you may well beyond that point already, see

    http://www.sommarskog.se/arrays-in-sql-2005.html#XML.

    Else, shredding in C# may be a winner.

    [font="Times New Roman"]Erland Sommarskog, SQL Server MVP, www.sommarskog.se[/font]

  • SQL# CLR library has procedure called String_SplitIntoFields.

    There other functions as well. Check it out, maybe it will help.

    http://www.sqlsharp.com/

    --Vadim R.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply