locked
Data.NewSchemaComparison command gives "parameter dataSourceGuid is not specified" error RRS feed

  • Question


  • Hi everybody:

    I´m trying to execute the Data.NewSchemaComparison command from the command window of Visual Studio, but I haven't succeeded so far.
    I´m working with Visual Studio 2010 Ultimate SP1 (10.0.402119.1 SP1Rel).

    This is the command I'm executing:

    Data.NewSchemaComparison /ProviderType ProjectBased /ProjectName MYPROJECT /ProviderType ConnectionBased /ConnectionName [MYPC\MYSQLINSTANCE.MYDATABASE] /ConnectionString "Data Source=MYPC\MYSQLINSTANCE;Initial Catalog=MYDATABASE;Integrated Security=True;Pooling=False" /dataSourceGuid "067ea0d9-ba62-43f7-9106-34930c60c5​28"

    The command shows me the following error:
    "parameter dataSourceGuid is not specified"

    I've read the following articles, but I still can't make it work:
    http://msdn.microsoft.com/en-us/library/aa833435.aspx
    http://msdn.microsoft.com/en-us/library/dd470565.aspx#CompareSchema
    http://blogs.msdn.com/b/psirr/archive/2008/11/22/schema-compare-dte-commands.aspx

    I've tried the following combinations for the /DataSourceGuid parameter, but still nothing:
    /dataSourceGuid "067ea0d9-ba62-43f7-9106-34930c60c5​28"
    /DataSourceGuid "067ea0d9-ba62-43f7-9106-34930c60c5​28"
    /dataSourceGuid {067ea0d9-ba62-43f7-9106-34930c60c5​28}
    /DataSourceGuid {067ea0d9-ba62-43f7-9106-34930c60c5​28}

    I have have run Visual Studio as a normal user and as an Administrator (Run As Administrator), but still nothing.

    ¿What I'm missing?
    ¿Any suggestions?

    Amando

    Friday, May 13, 2011 4:27 PM

Answers

  • Hello Amando - the DataSourceGuid was replaced by the friendlier "DspFamily" in VS 2010.  The following command worked for me.  I'll look at the links you provided and make sure they have been updated to reflect the differences between Visual Studio 2008 and Visual Studio 2010 Database Projects.  thanks!  Patrick

     

    Data.NewSchemaComparison  /ProviderType ProjectBased /ProjectName MyProject  /ProviderType ConnectionBased /ConnectionName [.\SQL2008r2.Database1] /ConnectionString "Data Source=.\sql2008r2;Initial Catalog=Database1;Integrated Security=True;Pooling=False" /DspFamily sql

    • Proposed as answer by psirr-MSFT Friday, May 13, 2011 7:22 PM
    • Marked as answer by Amando Resendez Tuesday, May 17, 2011 3:48 PM
    Friday, May 13, 2011 7:22 PM

All replies

  • Note, from the third link:

    /DataSourceGuid dataSource

    NOTE: This option has been deprecated in Visual Studio 2010 Beta 2

    It doesn't appear DataSourceGuid is a valid parameter in the released version, at least not from my quick look at the command handling code (I am not on the DB team).

    Ryan 

     

    Friday, May 13, 2011 6:00 PM
  • Hi Ryan:

    Thanks for your quick reply.

    I agree with you, according with http://msdn.microsoft.com/en-us/library/dd470565.aspx#CompareSchema the /DataSourceGuid doesn't seem to be supported on the release version.

    The weird thing is the error message asking for this parameter (/DataSourceGuid).

    Amando

    Friday, May 13, 2011 6:42 PM
  •  

    Just for the record.

    If I create a Schema Comparision directly in VS, set the same parameters in the "New Schema Comparision" window, and then open the .scmp file (with the XML Text Editor), I see the following code:

     <SourceModelProvider>
      <ProjectBasedModelProvider>
       <ProjectGuid>{67cbc824-a49e-4e9b-a947-360f3dfe65c3}</ProjectGuid>
       <Name>MYPROJECT</Name>
      </ProjectBasedModelProvider>
     </SourceModelProvider>
     <TargetModelProvider>
      <ConnectionBasedModelProvider>
       <ConnectionString>Data Source=MYPC\MYSQLINSTANCE;Initial Catalog=MYDATABASE;Integrated Security=True;Pooling=False</ConnectionString>
       <DatabaseName>MYDATABASE</DatabaseName>
       <DspFamilyName>sql</DspFamilyName>
       <Name>[MYPC\MYSQLINSTANCE.MYDATABASE]</Name>
      </ConnectionBasedModelProvider>
     </TargetModelProvider>
    

    As you can see, there is no DataSourceGuid parameter in the .scmp file. Which supports the note from Ryan (DataSourceGuid parameter is not supported in VS 2010 SP 1).

    Amando

    Friday, May 13, 2011 7:00 PM
  • Hello Amando - the DataSourceGuid was replaced by the friendlier "DspFamily" in VS 2010.  The following command worked for me.  I'll look at the links you provided and make sure they have been updated to reflect the differences between Visual Studio 2008 and Visual Studio 2010 Database Projects.  thanks!  Patrick

     

    Data.NewSchemaComparison  /ProviderType ProjectBased /ProjectName MyProject  /ProviderType ConnectionBased /ConnectionName [.\SQL2008r2.Database1] /ConnectionString "Data Source=.\sql2008r2;Initial Catalog=Database1;Integrated Security=True;Pooling=False" /DspFamily sql

    • Proposed as answer by psirr-MSFT Friday, May 13, 2011 7:22 PM
    • Marked as answer by Amando Resendez Tuesday, May 17, 2011 3:48 PM
    Friday, May 13, 2011 7:22 PM
  • >The weird thing is the error message asking for this parameter (/DataSourceGuid).

    No I think what it is saying in your case is that it doesn't RECOGNIZE the parameter, though the wording is...strange.  The 'is not specified' basically means is not a valid argument name I think.

    Ryan

    Friday, May 13, 2011 7:32 PM
  •  

    Thanks Patrick. This command worked.

    Thanks both for the help.

    Amando

    Tuesday, May 17, 2011 3:48 PM