Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 moving entire schema to other database

Author  Topic 

aakcse
Aged Yak Warrior

570 Posts

Posted - 2010-03-14 : 15:32:10
Hi,

is there any way to move the entire schema contents ( I have only tables and views) to different database.

I do not want to create this schema in the new db, I just want to move the schema contents to a different database.

instead of writing dynamic query using imformation schema etc. is there any direct way?

Regards,
aak.

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2010-03-14 : 17:19:55
Do you want the data too? If so, just use BACKUP/RESTORE. Otherwise, generate the schema script using SSMS generate script feature and then run it on the other database.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog

"Let's begin with the premise that everything you've done up until this point is wrong."
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2010-03-15 : 10:22:35
or you could use transfer db task

http://technet.microsoft.com/en-us/library/ms141204.aspx

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -