Debugging Multi-tier Database Applications
This topic applies to:
Visual Studio Ultimate |
Visual Studio Premium |
Visual Studio Professional |
Visual Studio Express |
---|---|---|---|
Debugging multi-tier database applications is a complex process, because it requires switching from debugging an application running on one computer to debugging database code running in a different process running on a different computer. Even if the application is not physically distributed, there will still be a context change from a middle tier process written in a managed or native language to a process running inside SQL Server, beginning with SQL Server 2005.
There can be three stages of multi-tier debugging to consider:
Debugging starts from a client or middle tier application that calls a stored procedure.
You can follow the thread of execution into the Transact-SQL of the stored procedure. Several database objects may be involved, such as triggers, user-defined functions, and so on.
You may wish to follow the thread of execution back to the originating tier so that you can examine the data that is returned, as well as do any additional debugging there that may be needed.
This section describes the necessary setup procedures, and provides a sample that illustrates how to debug a multi-tiered application.
For more information about debugging procedures for any database object, see Debugging Transact-SQL Database Objects.
In This Section
How to: Enable Multi-tier Debugging
Lists the additional setup steps required to enable debugging for multi-tiered SQL Server applications.How to: Debug a Multi-tier Database Application
Provides sample code that shows how to debug distributed database applications.
Related Sections
Debugging Transact-SQL Database Objects
Describes how to debug any SQL Server database object and provides sample code.Transact-SQL Database Debugging
Describes how to debug Transact-SQL database objects, such as stored procedures, triggers, user-defined functions, and so on.