sqldatabasevisual-studio-2010projectdatadude

VSDBCMD vs. SQLCMD


Which is a better option for deploying databases VSDBCMD or SQLCMD when using a database project (VS 2010). Is there any major drawback other than the defaulted variables (databasename, datapath and logpath)?


Solution

  • vsdbcmd is a diff tool: it can analyze the .dbschema, compare it with the target db and bring the target db up to the schema in the .dbschema file by selectively adding, dropping and altering existing objects. sqlcmd is only an execution tool, it takes a .sql script and blindly runs it. So it really apples to oranges, the two tools are quite different in purpose and capabilities.