Solved

use .bak to move database to another server

Posted on 2013-11-02
3
336 Views
Last Modified: 2013-11-02
I used to do this a lot and for some reason it is not working this time.

I have sql server 2012 and I am trying to migrate a database to another machine not on my network.  In previous version, I would have simply backed up the database and restored it on the new instance of sql.  This does not seem to be working.  What is the easiest way to complete this transaction?

Thanks,
0
Comment
Question by:gwarcher
  • 2
3 Comments
 
LVL 4

Accepted Solution

by:
ShareD_Point earned 500 total points
ID: 39619243
Hi,

1. Move the backup file to a folder (say C:\SQLBackup) of the remote Machine
2. Use the below statement to restore the database
   
      RESTORE DATABASE YourDBName FROM DISK = N'C:\SQLBackup\Demo.bak';

Even after following this approach, if the issue still persists, let us know what is the error you are getting.

Hope this helps
0
 

Author Comment

by:gwarcher
ID: 39619317
the error reads 'the backup set holds a backup of a database other than the existing 'dbase name' database.

If I delete the empty database of the same name it throws multiple errors.
0
 

Author Closing Comment

by:gwarcher
ID: 39619450
worked as a text query, but not using the wizard.
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
MS SQL Backup 24 72
how to eliminate duplicates in a string variable in t-sql? 30 44
Complex SQL 10 34
Authentication error 1 0
I wrote this interesting script that really help me find jobs or procedures when working in a huge environment. I could I have written it as a Procedure but then I would have to have it on each machine or have a link to a server-related search that …
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…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

743 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

15 Experts available now in Live!

Get 1:1 Help Now