[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

How to transfer / copy a database from one server to another

Posted on 2016-08-29
13
Medium Priority
?
94 Views
Last Modified: 2016-08-31
I need to copy or transfer a database (tables, views, stored procedures, functions, etc.) from one database server to another. I tried using the wizard and the wizard did not copy over any of the tables, views, stored procedures, functions. I tried import / export function and only the tables were copied over from the old database to the new one.  I also tried to use generate scripts for views and stored procedures and I have the script to my desktop or another location but I don't know how to import the views or stored procedures from the scripts to the database.
Is the a SQL script or any other way that I can copy the entire database from one server to another server. Time is of the issue. So your help is greatly appreciated.
Thank you
0
Comment
Question by:newjeep19
[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
13 Comments
 
LVL 35

Expert Comment

by:ste5an
ID: 41775480
The easiest way is to restore a backup on the second server.
0
 

Author Comment

by:newjeep19
ID: 41775508
Can you give me the steps? I have never done this before. Thanks
0
 
LVL 27

Expert Comment

by:Zberteoc
ID: 41775515
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 4

Expert Comment

by:Daniel Jones
ID: 41775766
You can also take the help of this link to copy data between servers
https://technet.microsoft.com/en-us/library/ms190923(v=sql.105).aspx
0
 
LVL 52

Expert Comment

by:Vitor Montalvão
ID: 41775910
Hi newjeep19,
I have 3 articles written about migrating databases. Each article talks about a method so you can choose the one that fits you more:
The Detach/Attach method
The Backup & Restore method
The Copy Database Wizard method
0
 

Author Comment

by:newjeep19
ID: 41776324
Thanks for sending me the links on the steps. I think that the backup and restore method is the best way to go about this. However, I am still on clear of how I can copy the full backup file from the source location backup path to the destination server. When I am on the destination server I go to Task-> Restore-> Restore Files and File groups and then click on the add button. However, their is no backup because the backup is on the source server and not the destination server. Thought? Examples? Thanks
0
 
LVL 52

Expert Comment

by:Vitor Montalvão
ID: 41776335
However, I am still on clear of how I can copy the full backup file from the source location backup path to the destination server.
You can copy the file through the network from the source to the target server.

When I am on the destination server I go to Task-> Restore-> Restore Files and File groups and then click on the add button. However, their is no backup because the backup is on the source server and not the destination server.
This is because SSMS only works with drive letters. If you want to use a share you need to type it as \\SourceServerName\c$\BackupFolder\BackupFileName.bak

Other option is to use T-SQL to restore the backup as I also wrote in my article. Just replace the path with the correct network path:
RESTORE DATABASE [DatabaseNameHere] 
FROM  DISK = N'\\ServerName\Backup\DatabaseName.bak' 

Open in new window

0
 

Author Comment

by:newjeep19
ID: 41776596
OK  when I try using the SSMS method I get the below error:
ErrorMEssage.png
0
 
LVL 32

Expert Comment

by:Pawan Kumar
ID: 41777616
Change the name of the backup and try again - it will work.
0
 
LVL 52

Expert Comment

by:Vitor Montalvão
ID: 41777631
You're trying to overwrite another database? If so you'll need to check the Overwrite option before running the Restore.
0
 

Author Comment

by:newjeep19
ID: 41778124
Thank you all for your assistance. I am able to due a full back up of multiple databases from your suggestions.
0
 
LVL 52

Accepted Solution

by:
Vitor Montalvão earned 2000 total points
ID: 41778141
Great.
If your issue has been solved please choose one or more comments that helped you so this question can be properly closed.
Cheers
1
 

Author Closing Comment

by:newjeep19
ID: 41778233
Thanks for all your help
0

Featured Post

Moving data to the cloud? Find out if you’re ready

Before moving to the cloud, it is important to carefully define your db needs, plan for the migration & understand prod. environment. This wp explains how to define what you need from a cloud provider, plan for the migration & what putting a cloud solution into practice entails.

Question has a verified solution.

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

Lotus Notes has been used since a very long time as an e-mail client and is very popular because of it's unmatched security. In this article we are going to learn about  RRV Bucket corruption and understand various methods to Fix "RRV Bucket Corrupt…
Windocks is an independent port of Docker's open source to Windows.   This article introduces the use of SQL Server in containers, with integrated support of SQL Server database cloning.
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…

656 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