BUG: Use <Database> Does Not Properly Change @@DBTS ContextLast reviewed: April 9, 1997Article ID: Q157518 |
The information in this article applies to:
SYMPTOMSThe Use <Database> statement does not change the context of the @@DBTS, unless the Use <Database> statement is run in a separate Transact-SQL batch.
WORKAROUNDTo work around this problem place the Use <Database> statement in a separate batch.
STATUSMicrosoft has confirmed this to be a problem in Microsoft SQL Server versions 6.0 and 6.5. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.
MORE INFORMATIONThe following query demonstrates the problem:
use pubs go select db_name(), @@DBTS go use tempdb select db_name(), @@DBTS go select db_name(), @@DBTS goThe following is the result of the query above:
------------------------------ ------------------ pubs 0x0100000097180000 **ERROR, database context is really tempdb but @@DBTS value belongs to PUBS ------------------------------ ------------------ tempdb 0x0100000097180000 ------------------------------ ------------------ tempdb 0x010000003e1a0000 |
Additional query words:
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |