sp_xml_removedocument (Transact-SQL)
Applies to:
SQL Server
Azure SQL Database
Azure SQL Managed Instance
Removes the internal representation of the XML document specified by the document handle and invalidates the document handle.
A parsed document is stored in the internal cache of SQL Server. The MSXML parser (msxmlsql.dll
) 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.
Transact-SQL syntax conventions
Syntax
sp_xml_removedocument hdoc
[ ; ]
Arguments
hdoc
The handle to the newly created document. A handle that isn't valid returns an error. hdoc is an integer.
Return code values
0
(success) or > 0
(failure).
Permissions
Requires membership in the public role.
Examples
The following example removes the internal representation of an XML document. The handle to the document is provided as input.
EXEC sp_xml_removedocument @hdoc;
Related content
Phản hồi
https://aka.ms/ContentUserFeedback.
Sắp ra mắt: Trong năm 2024, chúng tôi sẽ dần gỡ bỏ Sự cố với GitHub dưới dạng cơ chế phản hồi cho nội dung và thay thế bằng hệ thống phản hồi mới. Để biết thêm thông tin, hãy xem:Gửi và xem ý kiến phản hồi dành cho