In MS SQL Server 2005, how can I create a script consisting off all the objects in the database (tables, stored procedures, views)? I want to use the script to create the database using SMO or to update its objects (alter, drop) if they already exist. I know about the scripting feature in SQL Server Management Studio, I am however not familiar with the configuration options.
A:
If versioning your database schema is what you're getting to, try Wizardby. Although it does not directly support neither views nor sprocs, it supports running native SQL scripts as part of an upgrade/downgrade process.
Anton Gogolev
2009-07-06 13:54:50
A:
I use Easy Sql Tools. The deploy version is free. You can generate scripts from schemas, data, indexes, almost everything.
despart
2009-07-17 16:03:48
A:
There's a great tool SQL Compare that will actually compare two databases and create a change script for you. It's a great tool for staging purposes. There's also SQL Data Compare tool that will also compare lookup tables and act accordingly.
The downside is, they're not free. :(
Robert Koritnik
2009-10-22 14:04:26