Where Should I Find [Sp_Xml_Preparedocument]?

I recently used [sp_xml_preparedocument] to parse an XML file to analyze the parameter data.

What is interesting to me is that when I drill into my SQLServer 2k8r2 instance I cannot seem to actually find a procedure named [sp_xml_preparedocument].

I've been looking in System Databases/Mater and the Db I created for the analysis and it does not appear.

However [EXEC sp_xml_preparedocument @hdoc OUTPUT, @x] executes just fine.

I'd like to deepen my understanding of what is occurring and review the actual procedure.

Where should this stored procedure actually appear?

1

1 Answer

sp_xml_preparedocument is a system extended stored procedure. From SSMS Object Explorer, you'll find it under Databases-->System Databases-->Programmability-->System Extended Stored Procedures.

Since it's an unmanaged extended proc written in C++, not T-SQL, so you won't be able to review the source code. It used to just wrap the msxml COM API but I'm not sure if that's still the case nowadays since it's internal SQL Server code.

2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Alexander Ross

Alexander Ross

Gaming, Esports & Interactive Media Writer

Alexander Ross has covered the video game industry for a decade, writing deep dives on game design, esports tournaments, VR developments, and gaming culture.

Share this article
Twitter Facebook Pinterest