• Just to clarify:

    In our case we were calling sp_xml_removedocument EVERY time. The problem we ran into is not from the orphans, but from repeated selects from the xml. So, I agree that it's vital to call sp_xml_removedocument everytime, but it's also vital to only make a limited number of selects directly from the xml, which BOL doesn't emphasis enough. Also, the problem we ran into wasn't a server crash, just an unexpected failure of stored proccedure.

    Like you, our practice now is to make only one select against the xml - so you can get it into a temp table or table variable, then close it.

    I just wanted to mention this so others don't have to go thru the headache I went thru.