How to use the debug key to debug SQL server errors (832102)



The information in this article applies to:

  • Microsoft Systems Management Server 2003

Important This article contains information about modifying the registry. Before you modify the registry, make sure to back it up and make sure that you understand how to restore the registry if a problem occurs. For information about how to back up, restore, and edit the registry, click the following article number to view the article in the Microsoft Knowledge Base:

256986 Description of the Microsoft Windows Registry

SUMMARY

When a SQL error occurs in Microsoft Systems Management Server (SMS) 2003, the error message is written to the log file for the component that generated the SQL statement. You can identify this information because three asterisks ("***") appear before the SQL error log entries. The error log entries also frequently contain the phrase "ODBC" in the error message.

You can configure SMS 2003 to send these log statements to the debug output or to trigger a debugger when a SQL error is generated. This feature can be helpful when you want to determine why and under what circumstances the SQL error is generated.

MORE INFORMATION

Warning If you use Registry Editor incorrectly, you may cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that you can solve problems that result from using Registry Editor incorrectly. Use Registry Editor at your own risk.

When SMS 2003 processes a SQL error, SMS 2003 looks for the Debug DWORD value under the following registry key:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\SMS\SQL Server

By default, this registry key does not exist. However, if the Debug key exists or is added, and the Debug key value is set to 1, SMS 2003 calls OutputDebugString to send the query and the error message to the debug output. When the Debug key is set to 2 or greater, SMS 2003 calls DebugBreak to trigger the debugger.

Modification Type:MinorLast Reviewed:6/13/2005
Keywords:kbinfo KB832102 kbAudITPRO