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
Go
Exec Sp_ReNameDb '', ''
Go
Sp_DbOption <New_Database_Name>, 'Single User', False
Go
Note: You must restart or refresh the Query Analyzer to view the name change
Archived from: http://myitforum.com/cs2/blogs/dhite/archive/2007/12/30/sql-script-to-rename-an-existing-sql-server-database.aspx