Share via


how do i export just ddl for a sql server database

Question

Wednesday, May 30, 2012 8:20 PM

how do i export just ddl for a sql server database? I do not want to export the data.

All replies (2)

Wednesday, May 30, 2012 8:25 PM âś…Answered

Right click on the database and run Generate Script Wizard.

Or use Database Publishing Wizard to script out objects (tables, view, procs) etc.


Thursday, May 31, 2012 4:15 AM

If you do that frequently  and can afford paying some money I would  recommend looking at SQL Compare tool from www.red-gate.com

Otherwise,  you can script out all objects by using sqlcmd, powershell tools and re-create them on the destination.

Best Regards, Uri Dimant SQL Server MVP http://dimantdatabasesolutions.blogspot.com/ http://sqlblog.com/blogs/uri_dimant/