Running VSDBCMD to compare two dbschema files results in error "The target model contains 2 server options elements..."
-
2012年3月3日 上午 12:08
I'm running VSDBCMD to compare two versions of dbschema files from the same DB project. If I run the comparison without specifying the deploy manifest file it works (despite receiving serveral errors/warnings that references can't be resolved - but that's another question). I need to include the deploy manifest file though to ensure the pre and post scripts are included in the comparison but when I specify the deploy manifest file I get an error stating "The target model contains 2 server options elements...".
In this DB project I have a single reference to a server dbschema file. I do not have references to multiple server dbschema files. However, I do have references to dbschema files that also reference the same server dbschema file. Is this what is causing the error?
It's also worth noting that my DB projects target individual schemas within the same database. This is due to segregation of app database objects by schemas instead of by separate databases. (We're attempting to modularize a single database by schema instead of using multiple databases.)
Is there a way around this error or do I have to manually handle the pre and post scripts?
所有回覆
-
2012年3月6日 上午 04:28版主
Hello RobertN128,
What about your issue now? Have you managed to resolve it?
And I did a test on my side, I am sorry that I can't reproduce the same issue as you. Here is my structure of my database projects:
DBProj1---------Reference master.dbschema
DBProj2---------Referebce DBProj1+master.dbschemaAnd there are two versions of DBProj2.dbschema (DBProj2_v1.dbschema and DBProj2_v2.dbschema). And I can do the schema compare successfully for these two versions DBProj2.dbschema with the following vsdbcmd.exe command:
vsdbcmd.exe /a:deploy /dd:- /dsp:sql /ManifestFile:"DBProj2.deploymanifest" /model:"DBProj2_v1.dbschema" /targetmodelfile:"DBProj2_v1.dbschema" /DeploymentScriptFile:"DBProj.txt" /p:TargetDatabase="DBProj"
Please correct me if my understanding is incorrect. And it is better if you can send me one simple solution which can reproduce your issue via eamil: to v-vison @ Microsoft dot com.
Thanks.
Vicky Song [MSFT]
MSDN Community Support | Feedback to us
- 已標示為解答 Vicky SongModerator 2012年3月16日 上午 03:50
-
2012年3月16日 上午 03:52版主
Hello RobertN128,
I temporarily make my reply as answer. If you find it no help, please feel free to unmark it and let me know.
Thanks.
Vicky Song [MSFT]
MSDN Community Support | Feedback to us

