Export (0) Print
Expand All

How to: Enable SQL Server 2005 Debugging

This topic applies to:

Visual Studio Edition

Visual Basic

C#

C++

J#

Web Dev

Express

No

No

No

No

No

Standard

No

No

No

No

No

Pro/Team

Yes

Yes

Yes

Yes

Yes

If you have the required software, you can enable SQL debugging by performing these steps. For more information, see Software Requirements.

The SQL Server can run on the same machine as the application or on a remote machine. If you are debugging T-SQL code only, then no remote setup is required.

To debug remote SQL/CLR code, you must install the Remote Debugging Monitor (msvsmon.exe) on the remote SQL Server 2005 machine. Running the SQL Server setup program with the proper options will install the SQL debugging components.

Additional setup procedures are required for each Microsoft Visual Studio 2005 SQL Server project, and for the database connection used in a debugging session. For further information, please see How to: Enable SQL Debugging For a Project, How to: Enable CLR Debugging For a Connection, and How to: Enable Multi-tier Debugging.

To enable SQL debugging

  1. Install the Remote Debugging Monitor on the SQL Server 2005 machine. For more information see How to: Set Up Remote Debugging.

  2. Setup SQL Server permissions for debugging. For more information, see How to: Set SQL Server Permissions for Debugging.

  3. If the SQL Server version is SQL Server 2000, configure DCOM for SQL debugging on the server for SQL debugging. For more information, see How to: Configure DCOM for SQL Server 2000 Debugging.

  4. If you are debugging on Windows XP Service Pack 2, you must do the following to configure the Internet Connection Firewall to allow remote debugging. For instructions and details, see How to: Set Up Remote Debugging.

    1. On the Visual Studio host machine, you must add Devenv.exe to the Exceptions list and open the TCP 135 port.

    2. On the remote (SQL) machine, you must open the TCP 135 port and add sqlservr.exe to the Exceptions list. If your domain policy requires network communication to be done through IPSec, you must open the UDP 4500 and UDP 500 ports.

  5. When debugging SQL Server 2005, you don't need to manually start the Remote Debugging Monitor (msvsmon). If you have SQL/CLR debugging enabled and step into or hit a breakpoint, the debugger will automatically launch it. If you are debugging SQL 2000, for manual start up instructions see How to: Run the Remote Debugging Monitor.

See Also

Community Additions

ADD
Show:
© 2014 Microsoft