FIX: Server Must Be Cycled After sp_renamedb
  
PSS ID Number: Q110256
Article last modified on 10-31-1994
 
4.20
 
WINDOWS
 

----------------------------------------------------------------------
The information in this article applies to:
 
  - Microsoft SQL Server version 4.2
----------------------------------------------------------------------
 
BUG# NT: 487 (4.2)
 
SYMPTOMS
========
 
After using sp_renamedb to rename a database, if the database context is
changed to the renamed database using the following command,
 
   USE <DATABASE>
 
and the command,
 
   SELECT db_name()
 
is executed, the old name will be returned. Error messages mentioning the
database name will also refer to the old rather than the new name.
 
WORKAROUND
==========
 
Shutting down and restarting SQL Server will correct the problem.
Error messages and db_name() will return the correct value after the
server is cycled.
 
STATUS
======
 
Microsoft has confirmed this to be a problem in Microsoft SQL Server
version 4.2. This problem was corrected in SQL Server version 4.21. For
more information, contact your primary support provider.
 
Additional reference words: 4.20 Windows NT
KBCategory: kbprg
KBSubcategory: SSrvWinNT
 
=============================================================================
 
Copyright Microsoft Corporation 1994.
