INF: How to Debug an Extended Stored Procedure
ID: Q156099
 
  | 
The information in this article applies to:
- 
Microsoft SQL Server version  6.5
 
SUMMARY
This article describes the steps to properly debug an extended stored
procedure.
MORE INFORMATION
- Make a debug build of the extended stored procedure DLL with Visual C.
   Make sure to generate the PDB file.
 
- Once the DLL is properly built, copy it to the c:\Mssql\Binn directory.
   The DLL being loaded by SQL Server and the PDB must be in sync to
   properly handle breakpoints.
 
- Add the following to the Project Settings\Debug tab.
     Executable for debug session: C:\MSSQL\BINN\SQLSERVR.EXE
     Program arguments: -c
 
   This will start the SQL Server not as a service but under the control of
   the Visual C Debug environment. This will allow your breakpoints to be
   properly trapped and handled.
 
- Stop SQL Server if it is currently running by opening the Services tool
   in Control Panel and stopping the MSSQLSERVER service.
 
- Set your breakpoint and begin the debugging session.
 
- Once SQL Server is properly started and the cursor returns to a blinking
   state in the SQL Server command prompt window, minimize the window.
 
- Execute the extended stored procedure.
 
When the breakpoint is encountered the MSDEV environment will stop and you
can begin normal debugging.
Additional query words: 
ODS 
Keywords          : kbnetwork SSrvODS SSrvStProc 
Version           : 6.5
Platform          : WINDOWS 
Issue type        :