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.
LVL 1
rafaelrglAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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
nemws1Database AdministratorCommented:
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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server 2008

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.