• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 118
  • Last Modified:

copy database from one server to another

Hi, i have one database called dbtest on Server1 with a lots of tables, storeprocedure, functions, etc. I want that database to be copied to another Server2. I already have another empty database called dbtest in place at the Server2. I added both servers on my sql management studio, but i cant get the query to copy this database from server1 to server2.
0
rafaelrgl
Asked:
rafaelrgl
1 Solution
 
ste5anSenior DeveloperCommented:
Make a fresh backup of your database. Copy the backup to your second server and restore it there. See Copy Databases with Backup and Restore.
0
 
rafaelrglAuthor Commented:
I cant copy the backup to the second server since is on the online hosting company. but I can connect to the second server using sql server management in my computer.
0
 
hnasrCommented:
Using SQL EXPRESS 2014

For Server1:
Right click database, tasks-Generate Scripts.
Save script.

 On server2:
Run saved script.
0
 
ste5anSenior DeveloperCommented:
Even when it's on a hosted server, there must be the possibility to get you backup copied. I never heard of a service provider which does not support this.
0
 
nemws1Commented:
You can copy schema (tables, views, procs, etc.) using Generate Scripts, but it will *not* copy data.  If you have BIDS (Business Intelligence Design Studio) there is a "Copy Database" process in there.

However, the best solution is as others have said - do a backup, transfer the backup, then do a restore.  Contact your service provider to ask them how to do this in their environment.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now