Project Description
A command-line tool for interacting with a DBMS command-line interface (e.g., sqlcmd.exe) to execute a sequential list of SQL scripts against the DBMS. Tool allows for expression replacement in the SQL scripts during execution.

Command-line Reference: (parameter order is unimportant)

Community.Tools.Database.Builder.exe
  • ScriptRoot:<Path to SQL Scripts>
  • TargetLogRoot:<Path to Log Directory>
  • TargetDatabaseRoot:<Path for Database Files>
  • TargetDatabaseServer:<Database Server>
  • TargetDatabaseName:<Database Name>
  • [<Key>:<Value>] ...

Note: The tool is not currently integrated with MSBuild so if you are using the .targets file provided in the Examples archive the execution does not report a failure if there is an issue with the database build. Look in the Output window for information on whether execution had errors.

Note: SqlCmd.exe may not exit if you provide a bad input for the TargetDatabaseName or a relative path for the TargetDatabaseRoot. Before Release 1.0.2012.0418, if your Visual Studio instance locks up while you are using this utility in a target, then that is likely the reason; the workaround is to launch Task Manager and kill the SqlCmd.exe process. Once you kill the process, the Database Builder will finish executing the remaining scripts and Visual Studio will be responsive again. In Release 1.0.2012.0418 this issue is resolved with the addition of the ExecutionTimeout configuration setting that does the process killing automatically if it runs too long.

Last edited Apr 19, 2012 at 3:21 AM by jsaundea, version 7