Use this SQL server script from the SQL query window to rename an existing database. The script below will place the database in single user mode then rename the device and put then new device name back into multi user mode for use.
SQL Script:
Use Master
Go
Sp_DbOption <Current_Database>, 'Single User', True
Exec Sp_ReNameDb '<Current_Database_Name>', '<New_Database_Name>'
Sp_DbOption <New_Database_Name>, 'Single User', False
Note: You must restart or refresh the Query Analyzer to view the name change
Use this SQL server script from the SQL query window to rename an existing database. The script below will place the database in single user mode then rename the device and put then new device name ba ...