Microsoft KB Archive/150218

{|
 * width="100%"|

BUG: Stored Proc Can Cause Thread-Level AV After Dump/Load

 * }

Q150218

-

The information in this article applies to:


 * Microsoft SQL Server version 6.0

-

BUG#: 14657 (6.00)

SYMPTOMS
If a stored procedure creates a temporary table and executes another stored procedure that creates a temporary table with the same table name, it can cause a thread-level access violation (AV) the first time this stored procedure is executed after the database is dumped and then restored from the dump.

CAUSE
Limited testing has shown that the scenario for reproducing this problem has a narrow scope:


 * 1) The first stored procedure must create a local temporary table.
 * 2) The second stored procedure that is being executed within the first one must create a local temporary table with the same table name as the temporary table created in the first stored procedure.
 * 3) These two stored procedures must exist when the database dump was taken. Loading the database right after dump, and executing the first stored procedure will demonstrate the problem. Subsequent execution of these stored procedures will work fine.

WORKAROUND
Do not create a temporary table with the same table name within two stored procedures if one stored procedure needs to call the other one.

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

Additional query words: av

Keywords : kbprogramming

Issue type :

Technology : kbSQLServSearch kbAudDeveloper kbSQLServ600