How to rename database from Enterprise Manager?

Posted on 2005-05-16
Last Modified: 2013-12-03
(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?

Question by:Jim Horn
    LVL 28

    Accepted Solution

    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>'
    LVL 28

    Expert Comment

    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.
    LVL 68

    Assisted Solution

    Except that due to its "flakiness" (inconsistency), you should *never* use EM to attach or detach a db.
    LVL 65

    Author Comment

    by:Jim Horn
    Thanks guys.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Enabling OSINT in Activity Based Intelligence

    Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

    Introduction SQL Server Integration Services can read XML files, that’s known by every BI developer.  (If you didn’t, don’t worry, I’m aiming this article at newcomers as well.) But how far can you go?  When does the XML Source component become …
    Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
    Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
    Via a live example, show how to setup several different housekeeping processes for a SQL Server.

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now