Stored procedure tracing using the xml datatype


When running a stored procedure it is difficult to record what is happening. In this session we will develop logger code in T-SQL to add to your stored procedures. We will use the xml datatype to record parameter values, variable values and debug statements. We will look at the "For xml" statement as well as the xml datatype methods, especially the modify method. Finally we will look at how to read the logs when finished.


  • Russel Loski

    9 Recordings

    Russ Loski is a SQL Server BI Developer based in Dallas, TX. Twenty years ago, he began working with SQL Server 6.5. He has since continued to develop applications connected to all of the versions of SQL Server. He has worked with clients in industries from insurance to healthcare, from movie theaters to American football. Russ is a regular speaker at SQLSaturday events, as well as the SQL Server Users Groups in the North Texas region. Russ likes working with data in various shapes.

Recorded At:

Recorded on:

Apr 2, 2011

More Info:


  • XML 2 Recordings