[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2355
  • Last Modified:

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
0
Jim Horn
Asked:
Jim Horn
  • 2
2 Solutions
 
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

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now