An OPENXML rowpattern decides which XML elements become rows. This post tests absolute paths, a double slash that searches every level, and the ../ column pattern that reads the parent and grandparent. It repeats the result with nodes() and explains the flags value. Every result comes from SQL Server 2025.
sp_xml_preparedocument: Prepare XML in Memory and Always Release It
sp_xml_preparedocument parses an XML document into memory and returns a handle that OPENXML can read. This post shows the safe pattern with TRY and CATCH, why the handle number is not yours to choose, what happens when you reuse a released handle, and how the WITH clause and flags shape the rows. Every result comes from SQL Server 2025.
Pass a Table to a Stored Procedure With a Table Type
To pass a table to a stored procedure, you create a table type and declare a parameter of that type. This post builds a type, a procedure and a call that inserts three classes at once, then a call that inserts a thousand rows, and explains four common errors. Every result comes from SQL Server 2025.
SQL SERVER – Question to You – When to use Function and When to use Stored Procedure
Deciding when to use functions or stored procedures depends on the caller and required work. I want examples behind that choice.
SQL SERVER – 2012 – Executing Stored Procedure with Result Sets
Denali lets you execute a stored procedure with result sets and rename its columns at run time, with no temp table needed. Here is a quick script.
Finding the Slowest Stored Procedures With sys.dm_exec_procedure_stats
Find the slowest stored procedures with cache statistics, compare CPU and reads, and use two snapshots to isolate one busy hour.







