Running VSDBCMD to compare two dbschema files results in error "The target model contains 2 server options elements..."

Traitée Running VSDBCMD to compare two dbschema files results in error "The target model contains 2 server options elements..."

  • שבת 03 מרץ 2012 00: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?

כל התגובות

  • יום שלישי 06 מרץ 2012 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.dbschema

    And 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 יום שישי 16 מרץ 2012 03:50
    •  
  • יום שישי 16 מרץ 2012 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