|
|
|
SSCrazy
      
Group: General Forum Members
Last Login: 2 days ago @ 3:01 PM
Points: 2,642,
Visits: 1,131
|
|
|
|
|
|
SSCrazy
      
Group: General Forum Members
Last Login: 2 days ago @ 3:01 PM
Points: 2,642,
Visits: 1,131
|
|
Oh the embarrassment!!!!
Thanks to Carsten Dauguaard for spotting it.
In the code for the stored procedure
exec sp_xml_preparedocument @iDocumentHandle OUTPUT, @stdoc
should be
exec sp_xml_preparedocument @iDocumentHandle OUTPUT, @stXML
This is what you get when you copy a stored proc into Word, save it as html then edit the html in notepad!
LinkedIn Profile
|
|
|
|
|
SSCrazy
      
Group: General Forum Members
Last Login: 2 days ago @ 3:01 PM
Points: 2,642,
Visits: 1,131
|
|
Oh the embarrassment, thanks to Carsten Dauguaard for spotting it.
exec sp_xml_preparedocument @iDocumentHandle OUTPUT, @stdoc
should be
exec sp_xml_preparedocument @iDocumentHandle OUTPUT, @stXML
LinkedIn Profile
|
|
|
|
|
SSC Eights!
      
Group: General Forum Members
Last Login: Tuesday, July 31, 2007 8:20 AM
Points: 885,
Visits: 1
|
|
Great article !
Chris Kempster www.chriskempster.com Author of "SQL Server Backup, Recovery & Troubleshooting" Author of "SQL Server 2k for the Oracle DBA"
|
|
|
|
|
SSC Eights!
      
Group: General Forum Members
Last Login: Tuesday, July 31, 2007 8:20 AM
Points: 885,
Visits: 1
|
|
Hi
One question:
WARNING: - This will use 1/8th of the memory available to SQL Server.
So, we open up 10 4kb documents it will do what to memory?? and what memory structure are we talking about?
Cheers
Ck
Chris Kempster www.chriskempster.com Author of "SQL Server Backup, Recovery & Troubleshooting" Author of "SQL Server 2k for the Oracle DBA"
|
|
|
|
|
SSCrazy
      
Group: General Forum Members
Last Login: 2 days ago @ 3:01 PM
Points: 2,642,
Visits: 1,131
|
|
Books on line says "A parsed document is stored in the internal cache of SQL Server 2000. The MSXML parser uses one-eighth the total memory available for SQL Server. To avoid running out of memory, run sp_xml_removedocument to free up the memory.".
Although it makes reference to the XML Parser but it is not crystal clear whether this means there is a 1/8th penalty overall for using the XML parser or 1/8th per document.
I haven't had chance to test it in anger because the CMS we are developing on has a memory leak (more of a terminal gush) in its implementation of DOM so I've had to revert to itterating through a normal recordset building up the XML as a text string.
Which ever scenario is used the guideline I would suggest is to use the sp_xml_removedocument as soon as humanly possible.
LinkedIn Profile
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Tuesday, March 30, 2004 12:41 PM
Points: 1,
Visits: 1
|
|
| great article but my question is: where do you specify the pad to your XML file
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Friday, May 04, 2012 1:20 PM
Points: 1,
Visits: 15
|
|
What do we do if the XML to be processed is more than 8000 characters? Do we wait for SQL Sever 2005 for next generation of XML- SQL usage?
|
|
|
|
|
SSC Journeyman
      
Group: General Forum Members
Last Login: Tuesday, May 15, 2012 10:26 AM
Points: 88,
Visits: 348
|
|
In case anyone is still watching this thread... I come from the "validate all input" school, especially when a "blind" SP is called from who knows where. Does anyone have any guidance in SS2K on validating the elements in the document before hitting an exception for a "bad date" or "number too large for destination data type" issue? I've worked out a really clunky way using OPENXML into nvarchar fields, then validate, then parse again into typed fields when the entire doc is valid, but there must be something better
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Thursday, January 17, 2008 9:43 PM
Points: 1,
Visits: 2
|
|
| where do i store XML file
|
|
|
|