Solved

sql backup

Posted on 2011-02-10
5
326 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

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

919 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