Export (0) Print
Expand All

Transact-SQL Database Debugging

This topic applies to:

Edition

Visual Basic

C#

C++

Web Developer

Express

Topic does not applyTopic does not applyTopic does not applyTopic does not apply

Standard

Topic does not applyTopic does not applyTopic does not applyTopic does not apply

Pro and Team

Topic appliesTopic appliesTopic appliesTopic applies

Table legend:

Topic applies

Applies

Topic does not apply

Does not apply

Topic applies but command hidden by default

Command or commands hidden by default.

This section contains samples demonstrating debugging for all Transact

-SQL database object types.

In the past, Transact-SQL developers often wrote and debugged their Transact-SQL applications by using SQL Query Analyzer. Today, Query Analyzer has been replaced by the SQL Server Management Studio, which has no debugger. Transact-SQL developers now use the Visual Studio 2005 debugger instead.

Developers can also write their Transact-SQL applications in Visual Studio 2005, using a Database project. Whether you write your Transact

-SQL application in Visual Studio 2005 or not, debugging procedures are almost identical.

There are three debugging scenarios to consider:

In order to debug a trigger, you must start your debugging session in a stored procedure. You cannot debug a stand-alone SQL script, have it fire a trigger, and be able to debug the trigger.

Walkthrough: Debug a Transact-SQL Stored Procedure

Demonstrates how to debug stored procedures on a SQL Server.

Walkthrough: Debugging a Transact-SQL Trigger

Demonstrates how to step from a stored procedure into a trigger when it fires.

Walkthrough: Debugging a Transact-SQL User-Defined Function

Demonstrates how to step from a stored procedure into a user-defined function.

Community Additions

ADD
Show:
© 2014 Microsoft