How to: Configure DCOM for SQL Server 2000 Debugging
This topic applies to:
Edition |
Visual Basic |
C# |
C++ |
Web Developer |
---|---|---|---|---|
Express |
||||
Standard |
||||
Pro and Team |
Table legend:
Applies |
|
Does not apply |
|
Command or commands hidden by default. |
SQL debugging uses Distributed COM (DCOM) to communicate between a client computer and the database server. Therefore, you must configure DCOM to allow a remote user to attach the debugger to a process on the server.
Warning
Because of security considerations on a computer running SQL Server, you may want to restrict debugging access to a specific group or user. Do not give access to everyone, because this allows access to any user on the network. Because of differences in security models, SQL Server 2000 does not check individual DCOM permission for remote debugging.
Note
If you add an account for a remote user to debug on the local SQL Server, local users will no longer be able to debug on the local SQL Server unless you use dcomcnfg.exe to add their user accounts.
Note
You may need to configure DCOM access permissions for SQL debugging even if you are connected to a SQL Server on your local machine.
Note
The dialog boxes and menu commands you see might differ from those described in Help depending on your active settings or edition. To change your settings, choose Import and Export Settings on the Tools menu. For more information, see Visual Studio Settings.
Windows 2000
You may need to download and install DCOM first. If so, go to https://www.microsoft.com/com/resources/downloads.asp for the latest version.
You must have administrator privileges on the machine where you are configuring DCOM.
To configure DCOM on the server for SQL debugging
On the Start menu, click Run.
In the Open box, type dcomcnfg.exe.
Click OK.
The Distributed COM Configuration Properties dialog box appears.
Click the Default Security tab.
In the Default Access Permissions, click the Edit Default button.
The Registry Value Permissions dialog box appears. If the group or user who needs access does not appear in the list of permissions, click the Add button.
In the Add Names box in the Add Users and Groups dialog box, click the group or user who needs access from the Names list or type it in the Add Names box.
With the group or user name selected, in the Type of Access list, click Allow Access.
Click OK.
If SYSTEM does not appear in the list of permissions, click the Add button again.
In the Add Names box in the Add Users and Groups dialog box, select SYSTEM in the Names list, or type it in the Add Names box.
With SYSTEM selected, on the Type of Access list, select Allow Access.
Click OK.
If you changed any settings in this procedure, restart SQL Server.
Windows XP
You may need to download and install DCOM first. If so, go to https://www.microsoft.com/com/resources/downloads.asp for the latest version.
You must have administrator privileges on the machine where you are configuring DCOM.
To configure DCOM on the server for SQL debugging
On the Start menu, click Run.
In the Open dialog box, type dcomcnfg.exe.
Click OK.
The Component Services dialog box appears.
In the left pane of the Component Services dialog box, expand the Component Services node, and click Computers. Then find the computer for which you want to configure DCOM
Right-click the computer, and on the shortcut menu, click Properties.
In the Properties dialog box, select the Default COM Security tab.
Under Access Permissions, click Edit Default.
The Access Permission dialog box appears.
If the group or user who needs access does not appear in the list of permissions, click Add.
The Users, Computers, or Groups dialog box appears.
In the Enter the object names to select box, type the name of the group or user who needs access.
Click OK.
The user is now added to the list.
If SYSTEM does not appear in the list of permissions, click Add.
The Users, Computers, or Groups dialog box appears.
In the Enter the object names to select box, type SYSTEM.
Click OK.
SYSTEM is now added to the list.
In the Access Permission box, select Allow for each user you added.
Click OK to close the Properties dialog box.
If you changed any settings in this procedure, restart SQL Server.
See Also
Reference
SQL Debugging Setup Errors and Troubleshooting