Link to home
Create AccountLog in
Avatar of karthik80c
karthik80cFlag 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
Avatar of Jim Horn
Jim Horn
Flag of United States of America image

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.
Avatar of karthik80c

ASKER

sorry pal .I don't have the tool .can u give some query to do that and that would be great
SOLUTION
Avatar of Jim Horn
Jim Horn
Flag of United States of America image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
oh OK thanks . let me try with the tool
Take backup of the existing database and restore it where you need.
ASKER CERTIFIED SOLUTION
Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Thanks and Let me do this Pal