Kommentar
Åtkomst till den här sidan kräver auktorisering. Du kan prova att logga in eller ändra kataloger.
Åtkomst till den här sidan kräver auktorisering. Du kan prova att ändra kataloger.
This topic applies to:
Edition |
Visual Basic |
C# |
C++ |
Web Developer |
|---|---|---|---|---|
Express |
![]() |
![]() |
![]() |
![]() |
Standard |
![]() |
![]() |
![]() |
![]() |
Pro and Team |
![]() |
![]() |
![]() |
![]() |
Table legend:
![]() |
Applies |
![]() |
Does not apply |
![]() |
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:
Stepping into a Transact-SQL database object. For more information, see How to: Step into an Object Using Server Explorer.
Running a test script from the SQL Server Management Studio. For more information, see How to: Debug Transact-SQL Using the SQL Server Management Studio.
Running a test script from a Visual Studio 2005 Database project. For more information, see How to: Develop in Transact-SQL with the Database Project Type.
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.
In This Section
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.
.gif)
.gif)
.gif)