|Important||This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.|
How to: Enable SQL Debugging on SQL 2000 Desktop Engines
This topic applies to:
Pro and Team
Does not apply
Command or commands hidden by default.
To enable the debugging of stored procedures on the SQL 2000 Desktop Engine, perform one of the two following procedures on the machine where the SQL 2000 Desktop Engine is installed, depending on whether Visual Studio is installed on the machine.
The first step in both procedures is to copy a file to the \Binn directory under the MSDE SQL Server installation directory, which by default is \Program Files\Microsoft SQL Server\MSSQL\Binn.However, the directory location may change between product releases, and SQL Server may have been installed in a customized location, so you may need to search for the directory. If so, search for the file sqlservr.exe, which resides in the \Binn directory.
To enable debugging with the SQL 2000 Desktop Engine on a machine with Visual Studio installed
Copy MSSDI98.DLL from the \sqlserver directory under the Visual Studio installation directory to the \Binn directory under the SQL Server installation directory.
Visual Studio 2005 is installed by default at \Program Files\Microsoft Visual Studio 8. If it is not there, search for the file devenv.exe and the install directory will be the grandparent directory.
An older version of MSSDI98.DLL may already exist in the SQL Server \Binn directory. If so, the older version must be replaced by the new version.
To enable debugging with the SQL 2000 Desktop Engine on a machine without Visual Studio
Locate MSSDI98.DLL on the Visual Studio CD or DVD, and copy it to the \Binn directory under the SQL Server installation directory.
Locate SQLDBG.DLL on the Visual Studio CD or DVD, and copy it to:
program files\common files\microsoft shared\sql debugging
Reregister SQLDBG.DLL by entering the following command at the Command Prompt:
Grant execute permission on the stored procedure, sp_sdidebug, to the debugger user by executing the following command in Query Analyzer: