Multi-tier Application Database Debugging
This topic applies to:
Pro and Team
Does not apply
Command or commands hidden by default.
Debugging multi-tier database applications is a complex process, because it requires switching from debugging an application running on one machine to debugging database code running in a different process running on a different machine. 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 2005.
There can be three stages of multi-tier debugging to consider:
Debugging starts from a client or middle tier that calls a stored procedure.
You can follow the thread of execution into the stored procedure, which may be written in T-SQL or in a CLR language. 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.
More detailed debugging procedures for any database object are described in Debugging SQL Database Objects.