Solved

sql backup

Posted on 2011-02-10
5
332 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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:Ephraim Wangoya
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

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

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

Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
A Stored Procedure in Microsoft SQL Server is a powerful feature that it can be used to execute the Data Manipulation Language (DML) or Data Definition Language (DDL). Depending on business requirements, a single Stored Procedure can return differe…
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.

738 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