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

ID: Q172099


The information in this article applies to:
  • Microsoft Visual Basic Enterprise Edition for Windows, versions 5.0, 6.0
  • Microsoft Visual Studio 97


SYMPTOMS

After installing both SQL Server and Visual Basic Enterprise Edition on your local machine, you will be able to perform local SQL debugging. When running the local SQL debugger after remote debugging (Visual Basic and SQL Server reside on two different computers), the T-SQL debugger starts to skip breakpoints 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 log on the server reveals the following error message:
"CreateDispatch failed (Class not registered). Check to make sure Automation manager is running on debugger machine."


CAUSE

When installing the T-SQL Debugger client-side component, Visual Basic will create several Registry keys for VBSDISERVR.SDIEVENT under HKEY_CLASSES_ROOT in the Registry. The \LocalServer32 key for VBSDISERVR.SDIEVENT's CLSID is one of them that is being used by the local SQL debugging. When doing remote debugging from another computer, this key is deleted and some other keys for inprocServer are created. If you do local SQL Debugging after a remote SQL debugging session has been performed, Automation Manager will not be able to find the \LocalServer32 key in the Registry, resulting in the above error.


RESOLUTION

You can add the LocalServer32 key manually in REGEDT32.EXE to enable the next local SQL debugging. However, this key will be deleted again after another remote SQL debugging.

Steps to Add the LocalServer32 Key:

  1. Start the Registry Editor by running regedt32.exe.


  2. In Registry Editor, select HKEY_CLASSES_ROOTS\CLSID\{124765AA-7866-11CF-BF3B-00A0D10003FA}\.


  3. Choose Edit\AddKey on the menu and type "LocalServer32" as Key Name.


  4. Add the following value for LocalServer32 by choosing Edit\AddValue from the menu:
    
          Value Name:                     (Leave it empty)
          Data Type: REG_SZ
          String: C:\Program Files\DevStudio\VB\Tsql\vbsdicli.exe
     
    Note: Make sure you have an appropriate path for your vbsdicli.exe.


You can also add this Registry key in Visual Basic code by calling the Registry API. Please refer to the following article in the Microsoft Knowledge Base for how to implement this:
Q145679 : HOWTO: Use the Registry API to Save and Retrieve Setting


STATUS

Microsoft is researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.


MORE INFORMATION

This problem only occurs with local debugging. It doesn't happen during remote debugging.

Additional query words: kbVBp500 kbVBp600 kbdse kbDSupport kbVBp kbVS97 KbRegistry kbAPI

Keywords : kbGrpVBDB
Version :
Platform : NT WINDOWS
Issue type : kbprb


Last Reviewed: January 5, 2000
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.