Restore Database MSSMS

04Dec08

When you try to restore a database there are some very tricky stuff you need to know.

When using MSSMS (Microsoft SQL Server Management Studio)

Choose the Database you want to restore.restore


Choose From Device – Choose Add File (locate the .bak file)
restore2

restore3

Go to Options and Check the Overwrite existing database

restore4

If the database is from another Machine, you ll have to check that the path shown bellow.  Go to this path and make sure you have the database mdf file stored in the same location. you can modify that to specify the same path.

restore5

Click Ok and you re done.

You might get a message like that. (Exclusive access could not be obtained because the database is in use)
Workarounds are

To run this script

use Master

ALTER DATABASE yourdatabasename SET MULTI_USER WITH ROLLBACK IMMEDIATE;
Drop database yourdatabasename
Or if you have Profiler, Integration Services Or Analysis Services  Make Sure you go to
Computer, Manage, Services And Applications, SQL Server Configuration Mansager, right click and stop extra Services

Advertisements


No Responses Yet to “Restore Database MSSMS”

  1. Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: