Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

use .bak to move database to another server

Posted on 2013-11-02
3
Medium Priority
?
346 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
[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
  • 2
3 Comments
 
LVL 4

Accepted Solution

by:
ShareD_Point earned 2000 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

610 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