Solved

use .bak to move database to another server

Posted on 2013-11-02
3
340 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

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

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

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…
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

856 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