Microsoft KB Archive/279338

From BetaArchive Wiki
Knowledge Base


FIX: DBCC CHECKCONSTRAINTS Does Not Handle Names with Special Characters

Article ID: 279338

Article Last Modified on 10/17/2003



APPLIES TO

  • Microsoft SQL Server 2000 Standard Edition



This article was previously published under Q279338

BUG #: 351025 (SHILOH_Bugs)

SYMPTOMS

When DBCC CHECKCONSTRAINTS encounters names with special characters, such as spaces, it may return an error message that resembles the following:

Server: Msg 156, Level 15, State 1, Line 15 Incorrect syntax near the keyword 'Order'. Server: Msg 156, Level 15, State 1, Line 19 Incorrect syntax near the keyword 'Order'. DBCC execution completed. If DBCC printed error messages, contact your system administrator.

RESOLUTION

To resolve this problem, obtain the latest service pack for SQL Server 2000. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:

290211 INF: How to Obtain the Latest SQL Server 2000 Service Pack


STATUS

Microsoft has confirmed that this is a problem in SQL Server 2000. This problem was first corrected in SQL Server 2000 Service Pack 1.

MORE INFORMATION

The example error message from the "Symptoms" section came from running the following query:

use Northwind
DBCC CHECKCONSTRAINTS
                

The error occurs because there are several tables in the Northwind database whose names begin with "Order" and contain spaces; for example, [Order Details Extended] or [Order Subtotals].

Keywords: kbbug kbfix kbsqlserv2000sp1fix kbfile KB279338