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
 Create a blank Database

Author  Topic 

ArpitNarula
Starting Member

16 Posts

Posted - 2011-01-20 : 06:41:00
Hi,

My question is how can we create a blank database (only structure) from a full database(structure and data).

Thanks in advance.

nigelrivett
Master Smack Fu Yak Hacker

3385 Posts

Posted - 2011-01-20 : 06:47:39
Script all the tables (and SPs...?), create database, run script.
Create database, use SSIS to transfer objects without data.
Restore backup then truncate tables (might need to remove FKs first).

==========================================
Cursors are useful if you don't know sql.
SSIS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page
   

- Advertisement -