There is a free tool Subcommander , which is part of the open source SubSonic . I have successfully used this tool to create each circuit and dump data every night.
You can script to exit your schema and data (and then your favorite source code management system) using Subcommander. Just use the "version" command and tell SubCommander where to place the data:
sonic.exe version / out scripts
This will cause the script file (.sql) to exit to the local scripts directory of your project.
You can also try using the Microsoft SQL Server Database Publishing Wizard , although I'm not sure if you can use it in the bat file.
source share