locked
VSDBCMD: *** The specified property <property name> could not be used RRS feed

  • Question

  •  HI, I am having difficulties with properties that can be set when using VSDBCMD utility. I issued the following command to import a database:

    vsdbcmd /a:Import /cs:"Integrated Security=SSPI;Initial Catalog=DB_Framework;Data Source=.\vista_dev2008" /dsp:Sql /p:ModelType=Database  /Model:ImportedSchemas\MyTarget.dbschema

    I receive the following error message: /Model:ImportedSchemas\MyTarget.dbschema

    When I remove the  /p:ModelType=Database, it works well, I get a .dbschema file into my ImportedSchemas folder.

    I then wanted to deploy the database to another DB:

    vsdbcmd /a:deploy /cs:"Integrated Security=SSPI;Data Source=.\vista_dev2008" /dsp:Sql /Model:ImportedSchemas\MyTarget.dbschema /p:TargetDatabaseName=DB_Test /p:CreateNewDatabase=true

    I then receive the two following messages:

    *** The specified property TargetDatabaseName could not be used
    *** The specified property CreateNewDatabase could not be used

    I did not find the "Microsoft.SqlServer.BatchParser.dll" onto my PC. Is there related to my errors?

    Thank you for your help!
    Tuesday, October 21, 2008 2:03 AM

Answers

  • Sorry, you are correct. The updated syntax calls for properties delimited as name=value.  The documentation will be updated soon.

    I am able to do essentially what you were tring to achieve in your orginal post with the GDR RC using the following command line execution:

    C:\Temp>vsdbcmd.exe /a:Import /cs:"Server=.\SQL2005;Integrated Security=true;Pooling=false;Initial Catalog=NorthwindTest;" /dsp:Sql  /model:"NorthwindVSDBCMD.dbschema"
    Successfully imported database model and saved it to file C:\Temp\NorthwindVSDBCMD.dbschema

    C:\Temp>vsdbcmd.exe /a:Deploy /cs:"Server=.\SQL2005;Integrated Security=true;Pooling=false" /dsp:Sql /dd+ /model:"NorthwindVSDBCMD.dbschema"  /p:TargetDatabase="NorthwindVSDBCMD"
    TSD00000        Deployment script generated to:
    C:\Temp\NorthwindVSDBCMD.txt
    TSD00000        Creating NorthwindVSDBCMD...



    Does this work for you?

    Monday, November 17, 2008 5:30 AM
    Moderator

All replies

  • The command to deploy a DBSCHEMA file is:

    VSDBCMD /a:Deploy /dd /cs:"connectionstring" /dsp:Sql /model:ProjectName.dbschema /p:TargetDatabaseName:targetDB
    Monday, November 10, 2008 7:57 PM
    Moderator
  • HI, I did exactly that. Here is my command line:
    vsdbcmd /a:deploy /cs:"Integrated Security=SSPI;Persist Security Info
    =False;;Initial Catalog=SSISFramework;Data Source=CC_Local\DEV2008" /dsp:sql
      /model:test.dbschema /p:TargetDatabaseName:TestDB

    *** The specified property 'TargetDatabaseName:TestDB' is not valid.  Properties are specified as name=value

    I even tried replacing the : with = in the property assignment with same result:
    vsdbcmd /a:deploy /cs:"Integrated Security=SSPI;Persist Security Info
    =False;;Initial Catalog=SSISFramework;Data Source=CC_Local\DEV2008" /dsp:sql
      /model:test.dbschema /p:TargetDatabaseName=TestDB

    Same problem When I want to import a schema:

    vsdbcmd /a:import /cs:"Integrated Security=SSPI;Persist Security Info
    =False;;Initial Catalog=SSISFramework;Data Source=CC_Local\DEV2008" /dsp:sql
     /p:ModelType="Database" /model:TestDB.dbschema
    *** The specified property ModelType could not be used

    I had the same behaviour on two different machines. Worth mentionning that I now use the latest GDR (RC).

    Thank you for your help,
    Sunday, November 16, 2008 10:19 AM
  • Sorry, you are correct. The updated syntax calls for properties delimited as name=value.  The documentation will be updated soon.

    I am able to do essentially what you were tring to achieve in your orginal post with the GDR RC using the following command line execution:

    C:\Temp>vsdbcmd.exe /a:Import /cs:"Server=.\SQL2005;Integrated Security=true;Pooling=false;Initial Catalog=NorthwindTest;" /dsp:Sql  /model:"NorthwindVSDBCMD.dbschema"
    Successfully imported database model and saved it to file C:\Temp\NorthwindVSDBCMD.dbschema

    C:\Temp>vsdbcmd.exe /a:Deploy /cs:"Server=.\SQL2005;Integrated Security=true;Pooling=false" /dsp:Sql /dd+ /model:"NorthwindVSDBCMD.dbschema"  /p:TargetDatabase="NorthwindVSDBCMD"
    TSD00000        Deployment script generated to:
    C:\Temp\NorthwindVSDBCMD.txt
    TSD00000        Creating NorthwindVSDBCMD...



    Does this work for you?

    Monday, November 17, 2008 5:30 AM
    Moderator
  • Yes, it works for me. Thanks a lot!
    Monday, November 17, 2008 2:37 PM
  •  
    Barclay ,

    Can you tell me the syntax for importing server project as well?  The BOL syntax /p:ModelType:Server doesn't work.

    Thanks
    Nelson

    NN
    Monday, March 23, 2009 6:07 AM
  • Nelson,

    We have a doc bug on MSDN.  The command to to import a server model is: 

    VSDBCMD /a:Import /cs:"Server=.\SQL2008;Integrated Security=true;Pooling=false;Initial Catalog=master" /dsp:Sql /model:Server.dbschema
    PAUSE

    Thanks,


    Barclay Hill Program Manager VSTS: DB Team (DataDude, DBPro, Database Edition)
    Monday, March 23, 2009 6:20 PM
    Moderator
  • It is working now.  Thanks again.
    NN
    Monday, March 23, 2009 10:59 PM