How to restore a database?

Posted on 2009-12-20
Last Modified: 2012-05-08
I'm new to SQL Server but have a lot of experience with MySQL and PHPMyAdmin.

I have a backup of an MS SQL database (a BAK file).
On my PC, I have MS SQL Server 2008 Express and Microsoft SQL Server Management Studio.
I thought I would be able to go in to the Studio and find something like "File > Restore" but no such thing.

I searched the Studio help and all I found was stuff like "you can copy a database using restore ... " but nothing that actually tells me how!

The database itself already exists on my PC (it was created when I installed the Ektron Content Management System). Now I'm just trying to overwrite it with the database that is backed up, because that one actually contains some relevant data.

I think I just need to enter this command "somewhere" but where is the "somewhere"?( In phpMyAdmin with a MySQL database, I would just open a "SQL" tab and enter the command. I find no such thing in SQL Management Studio.)

RESTORE DATABASE mydatabasename FROM mydatabasebackupfile WITH NORECOVERY;

Seems like it should be simple but obviously I am missing something!

Question by:alicia1234
    LVL 142

    Accepted Solution

    check out in the databases folder's context menu, you can issue a "restore" from there, or use SQL window and issue a restore using T-SQL.
    basic minimal syntax:
    RESTORE DATABASE dbname FROM DISK='c:\backup_of_database.bak'

    more info:
    LVL 5

    Assisted Solution

    here you are how to restore from SQL Management Studio

    this is what you need

    Author Comment

    Both are correctt and came in within a minute of each other. Thanks.


    Featured Post

    Live: Real-Time Solutions, Start Here

    Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

    Join & Write a Comment

    Hi all, It is important and often overlooked to understand “Database properties”. Often we see questions about "log files" or "where is the database" and one of the easiest ways to get general information about your database is to use “Database p…
    In this article I will describe the Detach & Attach method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
    Here's a very brief overview of the methods PRTG Network Monitor ( offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

    745 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

    15 Experts available now in Live!

    Get 1:1 Help Now