How to Remove all the Xml Documents from the Cache Memory?

  • Hai friends,

     

    I am using sp_xml_preparedocument stored procedure to prepare the xmldocument.  but unfortunately i forget to remove the documents.

    I keep on creating the documents. At one stage, the following error will came

    Server: Msg 6624, Level 16, State 2, Procedure sp_xml_preparedocument, Line 1

    XML document could not be created because server memory is low. Use sp_xml_removedocument to release XML documents.

     

    So, Now i want to remove all the xml document from cache memory immediately.

    If u have a solution, pls post it.

     

  • i think restarting the sql server will solve the problem. i can't think of any other way.


    Everything you can imagine is real.

  • You can try the following trick:

    DECLARE @N int

    SET @N=1

    -- Instead of 1000, assign a reasonal value to compare.

    WHILE @N<1000

    BEGIN

    exec sp_xml_removedocument  @N

    SET @N=@N+1

    END

     

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

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