1

The Visual Studio (2010) gui provides options for specifying second command variable file for target. I however cant find this option for the command line implementation - vsdbcmd.exe.

Running vsdbcmd deploy for dbschema to dbschema with only source model command variables given results that objects that implement the variables are treated as having changes. Resulting in incorrect(improper) update script.

The command i use currently:

vsdbcmd.exe /a:deploy /dd:- /dsp:sql /model:Source.dbschema /targetmodelfile:Target.dbschema /p:SqlCommandVariablesFile=Database.sqlcmdvars /manifest:Database.deploymanifest /DeploymentScriptFile:UpdateScript.sql /p:TargetDatabase="DatabaseName" 

What im looking for is the /p:TargetSqlCommandVariablesFile, if such thing exists ...

The result script is the same as running so GUI compare without specifying the sqlcmd vars for target

2 Answers 2

1

I found what looks like full documentation for VSDBCMD.EXE at this link.

I think you may be looking for something like:

/p:SqlCommandVariablesFile=Filepath
Sign up to request clarification or add additional context in comments.

1 Comment

As by my original question this parameter i already use, however it doesnt impact the target dbschema resulting in script that treats any item with variable as change.
0

In the end i found no info on the possibility to do what I required - checked vsdbcmd libs with IL spy for hidden parameters - didn't find any.

Reached my goal by parsing the dbschema files for both target and current and parsing the cmd variable values directly into them - then doing the compare on modified dbschemas. This approach no longer allows to change sql cmd vars in resulting script (as the values are already baked into code), however this was deemed as acceptable loss.

Not the most beautiful solution but so far i have had no issues with it.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.