Events
Get certified in Microsoft Fabric—for free!
19 Nov, 11 pm - 10 Dec, 11 pm
For a limited time, the Microsoft Fabric Community team is offering free DP-600 exam vouchers.
Prepare nowThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
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
sp_xml_removedocument hdoc
[ ; ]
The handle to the newly created document. A handle that isn't valid returns an error. hdoc is an integer.
0
(success) or > 0
(failure).
Requires membership in the public role.
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;
Events
Get certified in Microsoft Fabric—for free!
19 Nov, 11 pm - 10 Dec, 11 pm
For a limited time, the Microsoft Fabric Community team is offering free DP-600 exam vouchers.
Prepare now