Avatar of karthik80c
karthik80c
Flag for United States of America asked on

How do i Copy All the Tables from One Database to Another in SQL Server?

Hi Experts,

We have created a new Database now want to move all the tables schema to the New Database , so is there any shortcut to do this on SQL Server.

Thanks in Advance
Microsoft SQL ServerMicrosoft SQL Server 2005

Avatar of undefined
Last Comment
karthik80c

8/22/2022 - Mon
Jim Horn

If you have SQL Serer Data Tools (SSDT) available you can create a new database project, then do a schema compare between source db and empty target db, then execute all objects.  This will create the schema but not move any data.
karthik80c

ASKER
sorry pal .I don't have the tool .can u give some query to do that and that would be great
SOLUTION
Jim Horn

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
karthik80c

ASKER
oh OK thanks . let me try with the tool
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
Pawan Kumar

Take backup of the existing database and restore it where you need.
ASKER CERTIFIED SOLUTION
Pawan Kumar

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
karthik80c

ASKER
Thanks and Let me do this Pal