Share via


How to: Configure Your Computers to Enable Transact-SQL and SQL Server CLR Integration Debugging

To enable debugging of Transact-SQL scripts or SQL Server Common Language Runtime (SQL CLR) objects, you must configure the firewall on the computers on which you are running Visual Studio and SQL Server. If your firewalls are not configured correctly, the message "Canceled by user" appears when you try to debug. For more information about debugging Transact-SQL, see Debugging Transact-SQL on the Microsoft Web site.

To configure the computer on which you run Visual Studio

  1. Configure your firewall to add the following inbound port exceptions: TCP 135, UDP 400, and UDP 500.

    For more information about how to manually configure your Windows Firewall, see How to: Configure the Windows XP Firewall for Remote Debugging or How to: Configure the Windows Vista Firewall for Remote Debugging. If you are using a different or additional firewall, see the documentation for that firewall for more information.

  2. Add a program exception to your firewall for DevEnv.exe.

    You must also configure the firewall on your SQL Server.

To configure the computer on which you run SQL Server

  1. Configure your firewall to add the following inbound port exceptions: TCP 135, UDP 400, and UDP 500.

    For more information about how to manually configure your Windows Firewall, see How to: Configure the Windows XP Firewall for Remote Debugging or How to: Configure the Windows Vista Firewall for Remote Debugging. If you are using a different or additional firewall, see the documentation for that firewall for more information.

  2. Add a program exception to your firewall for sqlsrvr.exe.

  3. If you want to debug SQL CLR objects, you must perform the following additional steps:

    • Add a program exception to your firewall for msvsmon.exe.

    • Add an exception for File and Printer Sharing.

See Also

Tasks

How to: Debug a SQL Server CLR Integration Stored Procedure

Other Resources

Debugging Database Objects That Use Managed Code (SQL Server CLR Integration Debugging)