I wanted to generate a script that would both create a copy of my database schema and also populate it with the data that is already in the tables. In the past, this meant you needed another application (e.g.
Database Workbench; although it does much more than just that one thing, and is a very useful tool), or you could
use a stored proc to generate a script.
Last month, Microsoft released the MSSQL Database Publishing Wizard. This tool can easily generate a script with the database schema and corresponding INSERT statements. It also has integration to VS.NET 2005, which is a very nice bonus.