how to take sql database backup without data [duplicate]
Possible Duplicate:
Backup SQL Schema Only?
Anybody tell how to take sql database backup without data. i wanted to take all the tables and structures from sql server 2008. and import to another sql开发者_运维问答 server 2008. i dont need the data.
Use "tasks" -> "Generate scripts" and choose what you want to script. Run, save to a file, open the file against the new database and run the script after changing the database name to match (if it changed)
First time you can use the script database option, as Otavio suggested.
Subsequent times you can use a tool like RedGate SQL Compare or the Compare Schema functionality of Visual Studio Database Edition. These tools allow you to synch schema (ie. 'table structure') from one database to another.
You can do this by making scripts. The way to go is:
- Right click the table you want to script to the other database.
- Script table as: -> Create to New query window.
精彩评论