The goal of this topic is to address any problems you may encounter while trying to start and use the Transact-SQL debugger. Potential sources of error include:
This topic describes how to identify and remedy various problems. Before attempting to troubleshoot your debugger configuration, verify the following:
SQL debugging uses Distributed COM (DCOM) to communicate between your client computer and the database server. You must configure DCOM to allow remote users to attach the debugger to a process on the database server.
By default, the correct DCOM settings are in place when SQL Server is installed. However, because of security considerations for the computer running SQL Server, you may want to restrict debugging access. Use the following as a general procedure for setting up DCOM on the SQL Server computer.
Important If you plan on running the debugger as any user other than the one running SQL Server, DCOM will need to be correctly configured first. Follow these steps to insure you have execution permission.
On the server:
OR
If you prefer to limit debugging to specific users, you can add individual domain user accounts (e.g. domain\account) with administrator privileges. If you choose to add only domain accounts instead of Everyone, make sure to add the SYSTEM account as well.
After applying those steps, your server's DCOM settings should look like this:
DCOMCNFG
|
|__ Application Tab
| |
| |_____ SQLDBREG
| |
| |______ Identity Tab
| |
| |_______ The interactive user
|
|__ Default Security Tab
|
|_____ Default Access Permissions
|
|______ Edit Default Button
|
|_______ Everyone (or domain\account and System)
DCOM95 on Windows 98 is not as robust as DCOM on Windows NT. In addition, RPCSS.EXE on Windows 98 can cause problems if it is not started either at shell load time or at boot time. To ensure that RPCSS.EXE is started early enough, modify either of the following registry entries:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunServices
Using any name, follow these steps to add a new String Value to the registry at either of those locations, and set its value to 'C:\WINDOWS\SYSTEM\RPCSS':
Also, make sure that the following registry keys are set to 'y':
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Ole\EnableDCOM
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Ole\EnableRemoteConnect
You must reboot your computer after making any of these changes.
If the debugger fails to start, and you encounter any of these error messages, then you may need to manually setup the debugging environment:
ODBC: Msg 0, Level 16, State 1
[Microsoft][ODBC SQL Server Driver][SQL Server]Cannot load the DLL mssdi98.dll, or one of the DLLs it references.
Reason: 126 (The specified module could not be found.).
Unable to connect to debugger on <Server Name>
(Error = 0x80004002 No such interface supported ).
Ensure that client side components such as SQLDBREG.EXE are installed and registered on <Server Name>. Debugging disabled for connection 54.
Missing or unregistered sdiclnt.dll
Initialization of the debugger failed!
Possible cause:
'sdiclnt.dll' was not installed or registered properly.
Follow these steps to manually install and register missing debugger components when the server and client (i.e. Query Analyzer) are running on the same machine:
regsvr32 sdiclnt.dll
Note On Windows 9x, the regsvr32 utility is located under the \windows\system folder.
sqldbg.dll
sqldbreg.exe
then, register the files:
regsvr32 sqldbg.dll
sqldbreg /RegServer
Follow these steps to manually install and register missing debugger components when the server and client are running on different machines:
On the client:
regsvr32 sdiclnt.dll
Note On Windows 9x, the regsvr32 utility is located under the \windows\system folder.
sqldbg.dll
sqldbreg.exe
then, register the files:
regsvr32 sqldbg.dll
sqldbreg /RegServer
On the server:
sqldbg.dll
then, register the file:
regsvr32 sqldbg.dll
Variables of this type are not displayed in the local variables window.
Variables of these types are displayed within the local variables window, but cannot be modified.