INF: Advanced Debugging of SQL Server Procedures

Last reviewed: April 10, 1997
Article ID: Q163451
The information in this article applies to:
  • Microsoft SQL Server, version 6.5

SUMMARY

This article describes the method of debugging a stored procedure that invokes an extended stored procedure, while also debugging that extended stored procedure.

MORE INFORMATION

First, you may want to read the following articles in the Microsoft Knowledge Base:

  • ARTICLE-ID: Q156096
       TITLE     : INF: Tips for Debugging Stored Procedures from VC++
    
    
  • ARTICLE-ID: Q156099
       TITLE     : INF: How to Debug an Extended Stored Procedure
    
    
Integrating the information in these articles is not difficult. However, you must understand that each is a separate debugging process. As such, you cannot perform both operations from the same debugging session. The Visual C/C++ product does not currently allow you to debug multiple processes in the same session.

Use the following procedure to make it work:

  1. Follow the steps outlined in Q156099. Make sure SQL Server is up and running under the debugger, and that your breakpoints are properly set.

  2. Start a second session of Visual C.

  3. Create a console project and add a data source to the project. You can think of this as a simple project. No source code files, just the ability to add the data source.

  4. Follow the steps outlined in Q156096 to debug the stored procedure.

Each debugging session allows you to debug that respective part of the scenario.


Additional query words:
Keywords : kbprg SSrvProg
Version : 6.5
Platform : WINDOWS
Issue type : kbhowto


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: April 10, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.