Link to home
Start Free TrialLog in
Avatar of alicia1234
alicia1234Flag for United States of America

asked on

How to restore a database?

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!
Thanks.


ASKER CERTIFIED SOLUTION
Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of alicia1234

ASKER

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