BUG: DocError Books Online for sp_resetstatus/sp_marksuspect

Last reviewed: May 2, 1997
Article 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 : kbbug6.00 SSrvDoc_Err
Version : 6.0
Platform : WINDOWS


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: May 2, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.