Question

I am trying to use VSDBCMD.exe (Visual Studio 2010 version) to deploy the output of a database project. I am including the /dd:+ switch in my command line. Every time I run the command, I get one message:

TSD00566        Deployment script generated to:
C:\Deploy\SqlServerDB.txt

There are no errors, but the deployment script is not executed and no deployment happens. I do not have the /Quiet switch turned on.

I have tried both specifying all parameters on the command line and using the .deploymentmanifest file. I get the same results either way: a script file is generated, but not executed. No schema changes are deployed.

I do know that my connection string is correct, because the deployment script that is generated is valid (and even references file paths that only exist on the target SQL server).

My current command line (as in, most recent attempt) is

vsdbcmd.exe 
    /a:Deploy 
    /cs:"Data Source=[the correct server];Integrated Security=True;Pooling=False;Initial Catalog=[the correct database]" 
    /Quiet- 
    /dd:+ 
    /p:TargetDatabase="[the correct database]" 
    /dsp:Sql 
    /Model:"C:\[output path]\SqlServerDB.dbschema"

Can you please help me figure out how to troubleshoot this command, since I am not getting any error messages or useful output?

Was it helpful?

Solution

When VSDBCMD generates a delta script and detects that there are no changes between the database project and the target database, it does not execute the deployment step.

However, it also does not display any message indicating why it id not deploy. So, there were no errors (ergo no error messages) but it did not deploy because the source scripts were identical to the destination database after the first time we ran the command.

It would be nice to have some kind of message indicating "no changes to deploy," but at least I know now that it is working as designed, and that there was no deployment necessary.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top