BUG: DocError Books Online for sp_resetstatus/sp_marksuspect

ID: Q141544


The information in this article applies to:
  • Microsoft SQL Server version 6.0

BUG# NT: 12099 (6.00)

SYMPTOMS

In the Microsoft SQL Server version 6.0 Books Online, "Administrator's Companion," Part 8 Troubleshooting, Chapter 24 topic on Creating Supplemental Stored Procedures, the section titled "Resetting the Suspect Status" contains errors and will produce error messages if you execute the sample code.


CAUSE

The example code for creating stored procedure sp_resetstatus has some syntax errors due to missing string concatenation operator '+'. If you run the code, you will get the following error messages:

Msg 170, Level 15, State 1
Line 11: Incorrect syntax near 'to execute this procedure.'.
Msg 170, Level 15, State 1
Line 18: Incorrect syntax near '@@dbname'.
Msg 170, Level 15, State 1
Line 25: Incorrect syntax near '@@dbname'.
Msg 170, Level 15, State 1
Line 26: Incorrect syntax near 'is already marked suspect.'.
Msg 170, Level 15, State 1
Line 38: Incorrect syntax near '@@dbname'.
Msg 170, Level 15, State 1
Line 38: Incorrect syntax near 'suspect!'.
Msg 170, Level 15, State 1
Line 42: Incorrect syntax near 'dropped via DBCC DBREPAIR.'.

In the section "Marking a Database Suspect," the example code for creating stored procedure sp_marksuspect has some syntax errors due to missing string concatenation operator '+'. If you run the code, you will get the following error messages:
Msg 170, Level 15, State 1
Line 11: Incorrect syntax near ' to execute this procedure.'.
Msg 170, Level 15, State 1
Line 17: Incorrect syntax near '@@dbname'.
Msg 170, Level 15, State 1
Line 35: Incorrect syntax near '@@dbname'.

Also in both these stored procedures, variables 'dbname' and 'msg' are defined with two @@ which is not needed. The variable names should just have one @ rather than two.

NOTE: These same examples in the printed version of the "Administrator's Companion" seem to be correct.


WORKAROUND

Put the missing '+' at all the appropriate places, or run the \SQL\INSTALL\INSTSUPL.SQL script.


STATUS

Microsoft has confirmed this to be a problem in Microsoft SQL Server version 6.00. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

Additional query words: sql6 documentation error

Keywords : SSrvDoc_Err kbbug6.00
Version : 6.0
Platform : WINDOWS
Issue type :


Last Reviewed: March 23, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.