Solved

sql backup

Posted on 2011-02-10
5
328 Views
Last Modified: 2012-05-11
I have .bak file from sql server 2005, and now I want restore the .bak to sql server 2008
in other box.

How can I do that in SQL studio?
0
Comment
Question by:Webboy2008
5 Comments
 
LVL 12

Expert Comment

by:ErezMor
ID: 34866744
right click "databases" in the object explorer of you sql management studio, and select restore database... then select "from device" option and point to the bak file you have.
that's about it
0
 
LVL 4

Expert Comment

by:evgeny_f31
ID: 34866773
0
 
LVL 32

Expert Comment

by:ewangoya
ID: 34866905

Save your backup file to the destination server
In SSMS, right click on Databases then select Restore Database

You will get a dialog as shown here

Type in the name of the database
Check From Device and use the button to locate your backup file
Click OK and the file should be restored to the new server
RestoreDB.png
0
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 34867851
In addition you may have to change the paths to the database files.
0
 
LVL 13

Accepted Solution

by:
geek_vj earned 500 total points
ID: 34868889
Copy the .bak file onto the destination server (SQL 2008 hosted server). As this is on a different server, you need to give another location for placing data and log files. Here is the sample query for the same:

Restore database <newdbname> from disk = '<Backupfilelocationhere>'
with move '<Logicaldatafilenamehere>' to '<Give new location for placing the data file>'
, move '<Logicallogfilenamehere>' to '<Give new location for placing the log file>'
, stats = 1

Sample query would look like this: (Original database = Test & New database = Testnew"

Restore database Testnew from disk = 'C:\Test.bak'
with move 'Test_data' to 'D:\Testnew_data.mdf'
, move 'Test_Log' to 'E:\Testnew_Log.ldf'
, stats = 1
0

Featured Post

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
age from date of birth 4 43
Modal Popup Extender control 1 22
Time Conversions...both ways 2 16
New to SSRS, extremely slow running report. 8 20
Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
I have a large data set and a SSIS package. How can I load this file in multi threading?
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

831 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