How to rename database from Enterprise Manager?

(I realize this is a colossaly stupid question, and hate to ask it here, but...)

How do you rename a SQL Server database from the Enterprise Manager?

TIA
-Jim
LVL 66
Jim HornMicrosoft SQL Server Developer, Architect, and AuthorAsked:
Who is Participating?
 
rafranciscoCommented:
I don't think there's a way to rename a database in Enterprise Manager but in Query Analyzer you use sp_renamedb:

EXEC sp_renamedb '<Old DB Name>', '<New DB Name>'
0
 
rafranciscoCommented:
If you really want it in Enterprise Manager, here's what you can do:

1.  Detach the database.
2.  Re-attach the database and assign a new database name.
0
 
Scott PletcherSenior DBACommented:
Except that due to its "flakiness" (inconsistency), you should *never* use EM to attach or detach a db.
0
 
Jim HornMicrosoft SQL Server Developer, Architect, and AuthorAuthor Commented:
Thanks guys.
-Jim
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.