| Author |
Topic |
|
X002548
Not Just a Number
15586 Posts |
Posted - 2007-06-28 : 15:14:43
|
| So, I created spome sprocs using OPENXML63 ms transaction length..not too shabbyBUT!I prepared 2 documnets and forgot to do sp_xml_removedocument duiring the exit of the sprocHave have since fixed that, but I've left 2 documents in memory, and with out know idoc, I don't know how to remove themAnyone have any ideas how to "see" all the prepared docs in memory and/or (and more importantly) the idI've been pouring over google and bol but no joyBrett8-)Hint: Want your questions answered fast? Follow the direction in this linkhttp://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspxAdd yourself!http://www.frappr.com/sqlteam |
|
|
jezemine
Master Smack Fu Yak Hacker
2886 Posts |
Posted - 2007-06-28 : 16:01:49
|
how big were the xml blobs in the documents? if not enormous I wouldn't worry about it - are you experiencing memory pressure on this server? in any case they will get cleaned up next time you cycle the service. elsasoft.org |
 |
|
|
X002548
Not Just a Number
15586 Posts |
Posted - 2007-06-28 : 16:12:42
|
quote: Originally posted by jezemine how big were the xml blobs in the documents? if not enormous I wouldn't worry about it - are you experiencing memory pressure on this server? in any case they will get cleaned up next time you cycle the service. elsasoft.org
No there are small...and yes I know that it get cleaned up on reboot..but I mean, there gotta be a way...Booting the server is the only way?There's some hell of a designBrett8-)Hint: Want your questions answered fast? Follow the direction in this linkhttp://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspxAdd yourself!http://www.frappr.com/sqlteam |
 |
|
|
jezemine
Master Smack Fu Yak Hacker
2886 Posts |
Posted - 2007-06-28 : 17:24:01
|
reboot should not be necessary - just restarting the service.but I wouldn't sweat it if the docs were small. Just leave them there and they will get cleaned up next time you cycle. elsasoft.org |
 |
|
|
sshelper
Posting Yak Master
216 Posts |
Posted - 2007-06-28 : 17:31:00
|
| According to Books Online: "sp_xml_preparedocument returns a handle that can be used to access the newly created internal representation of the XML document. This handle is valid for the duration of the connection to Microsoft® SQL Server™ 2000, until the connection is reset, or until the handle is invalidated by executing sp_xml_removedocument."So once your connection is closed, the document is removed from memory.Also, from Books Online:"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."Since it's stored in internal cache, I believe there's no way of retrieving it again. All you have to do is close your connection and the document is gone.SQL Server Helperhttp://www.sql-server-helper.com |
 |
|
|
jezemine
Master Smack Fu Yak Hacker
2886 Posts |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
sshelper
Posting Yak Master
216 Posts |
Posted - 2007-06-29 : 10:25:33
|
| Based on the description, I believe it is similar to temp tables. Once you close your connection, the documents gets cleaned up.SQL Server Helperhttp://www.sql-server-helper.com |
 |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
Kristen
Test
22859 Posts |
Posted - 2007-06-29 : 11:44:57
|
| "In any case, I waas worried about performance, but it really does fly"It won't once (if) the XML gets large.We were using that route for XML that was 2MB+ big, It was slow (tens of minutes IIRC). We moved to the SQLXMLBulkLoad COM object and that is seriously fast by comparison (minutes-turned-to-milliseconds).Kristen |
 |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
Kristen
Test
22859 Posts |
Posted - 2007-06-29 : 13:49:22
|
| "Got some sample code?"I've got some VBScript that you are welcome to.Send me a private message offline, and I'll attach the files.Gotta run now, off out to dinner tonight, but I will be around Saturday morning - if hangover not too bad!Kristen |
 |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
Kristen
Test
22859 Posts |
Posted - 2007-07-09 : 14:58:27
|
Nah, not in BoL 'coz its a separate COM object.These may help:http://sqljunkies.com/Article/650DF949-148D-46B3-9156-6783646F976D.scukand this one:http://msdn2.microsoft.com/en-us/library/aa225730(sql.80).aspxgawd knows why they have to put ( ) in their URLs ... you're gonna have to Cut&Paste that one And watch out as MS will probably have uprated all its DOCs to SQL2005 and dumped all the earlier version SQL2000 stuff. Principal is the same though.Send me a P.M. if you want a copy of my little VBScript thingieKristen |
 |
|
|
DonAtWork
Master Smack Fu Yak Hacker
2167 Posts |
Posted - 2007-07-10 : 11:34:50
|
"sp_xml_preparedocument returns a handle that can be used to access the newly created internal representation of the XML document. This handle is valid for the duration of the connection to Microsoft® SQL Server™ 2000, until the connection is reset, or until the handle is invalidated by executing sp_xml_removedocument."This tells me that the HANDLE is valid until the connection closes. I don't see where the document itself is removed on closing the connection. I read the handle as a pointer to the object. I could be wrong, it HAS happened before [Signature]For fast help, follow this link:http://weblogs.sqlteam.com/brettk/archive/2005/05/25.aspxLearn SQLhttp://www.sql-tutorial.net/ http://www.firstsql.com/tutor.htm http://www.w3schools.com/sql/default.asp |
 |
|
|
|