FIX: Stored Procedure That Creates Temp Table [#a.b.c.d.e] Causes Access Violation (308817)
The information in this article applies to:
- Microsoft SQL Server 2000 (all editions)
This article was previously published under Q308817
BUG #: 354434 (SHILOH_BUGS)
SYMPTOMS
The execution of a stored procedure that creates a temporary table with one of the following name patterns, which also deletes or selects data from the temporary table, may cause an Access Violation:
Table Name: #a.b.c.d.e
-or-
Table Name: #f.
Where a, b, c, d, e, f can be any combination of characters that
result in a valid identifier or an empty string, and the table
name can be delimited by double quotes (" ") or brackets ([ ]).
In other words, the problematic temporary table name ends in a dot ".", or contains four or more dots.
CAUSE
A table name that follows one of the name patterns described in the
"Symptoms" section does not comply with the rules for the format of
regular identifiers and must be delimited. Delimited identifiers are either enclosed in double quotation marks (" ") or brackets ([ ]).
For temporary tables created in a stored procedure that follow one of the name patterns described in the "Symptoms" section, SQL Server does not correctly interpret the table name handed over to the query processor because the query tree removes the delimiters that enclose the temporary table name.
RESOLUTIONTo resolve this problem, obtain the latest service pack for Microsoft 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
WORKAROUND
To work around this problem, modify the temporary table name so that it does not contain four dots "." and so that it does not end in a dot.
STATUSMicrosoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.
This problem was first corrected in Microsoft SQL Server 2000 Service Pack 2.
Modification Type: | Major | Last Reviewed: | 10/17/2003 |
---|
Keywords: | kbbug kbfix KB308817 |
---|
|