You are currently offline, waiting for your internet to reconnect

PRB: T-SQL - Running Remote and Local SQL Debugging

This article was previously published under Q172099
This article has been archived. It is offered "as is" and will no longer be updated.
After you install both SQL Server and Visual Basic Enterprise Editionon your local computer, you can perform local SQL debugging. When you run the local SQL debugger after remote debugging (Visual Basicand SQL Server reside on two different computers), the T-SQL debuggerstarts to skip breakpoints that are set in the SQL stored procedure with the following error message:
"The query could not be debugged due to a problem coordinating events with the server. Check the server and client log to find the exact cause, fix the problem and try again."
The Event Viewer application log on the server reveals the following error message with a source of MSDEVSDI:
"CreateDispatch failed (Class not registered). Check to make sure Automation manager is running on debugger machine."
When you install the T-SQL Debugger client-side component, Visual Basiccreates several registry keys for VBSDISERVR.SDIEVENT underHKEY_CLASSES_ROOT in the registry. The LocalServer32 key forVBSDISERVR.SDIEVENT's CLSID is one of the keys that local SQL debugging uses. When you perform remote debugging from another computer, this keyis deleted, and some other keys for inprocServer are created. If you perform local SQL debugging after a remote SQL debugging session has beenperformed, Automation Manager cannot find the LocalServer32key in the registry, which results in the above-mentioned error message.
To temporarily work around this problem, you can use Regedit.exe to add the LocalServer32 key manually to enable the next local SQL debugging instance; however, this key is deleted again after another remote SQL debugging.

Steps to Add the LocalServer32 Key:

  1. From the Start menu, click Run, and type regedit.exe to start Registry Editor.
  2. Select the following key:
  3. On the Edit menu, click Add Key, and type LocalServer32 in the Key Name box.
  4. Click to select the new LocalServer32 key in the right pane. On the Edit menu, click Modify, and type the following value for the LocalServer32 key:

    In Visual Basic 5.0:
    C:\Program Files\DevStudio\VB\Tsql\Vbsdicli.exe
    In Visual Basic 6.0:
    C:\Program Files\Microsoft Visual Studio\VB98\Tsql\Vbsdicli.exe
    NOTE: Make sure that you type the appropriate path for your Vbsdicli.exe file.
You can also add this registry key in Visual Basic code by calling theRegistry application programming interface (API). For additional information on how to implement this, click the article number below to view the article in the Microsoft Knowledge Base:
145679 HOWTO: Use the Registry API to Save and Retrieve Setting
This problem only occurs with local debugging; it does not occur duringremote debugging.

Article ID: 172099 - Last Review: 02/28/2014 08:06:39 - Revision: 1.1

Microsoft Visual Basic 5.0 Enterprise Edition, Microsoft Visual Basic Enterprise Edition for Windows 6.0

  • kbnosurvey kbarchive kbapi kbprb kbregistry KB172099