VSDBCMD vs. SQLCMD

1.8k Views Asked by At

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)?

2

There are 2 best solutions below

1
On BEST ANSWER

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.

3
On

Your question is not very clear, so it isn't easy to give you a good answer, but according to your comment to Remus's answer, I assume you are trying to execute the .sql script that vsdbcmd.exe generated. If my assumption is correct, you need to use sqlcmd.exe to execute this script.

According to this thread on MSDN Forums, the VSDB team didn't want to duplicate functionality in vsdbcmd.exe that already exists in sqlcmd.exe.