Debugging Multi-tier Database Applications

This topic applies to:

Visual Studio Ultimate

Visual Studio Premium

Visual Studio Professional

Visual Studio Express

ms165059.DoesApplybmp(en-us,VS.100).gif ms165059.DoesApplybmp(en-us,VS.100).gif ms165059.DoesApplybmp(en-us,VS.100).gif ms165059.DoesNotApplybmp(en-us,VS.100).gif

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

See Also

Other Resources

Debugger Security

Setting Up Transact-SQL Debugging