locked
VSDBcmd How to exclude objects when generating update script?

    Question

  • When using the UI in Visual Studio 2010 its possible to exclude objects e.g. SQL files and Users.
    How do I do this when using the vsdbcmd? Cant find a /p: option or an option in the /p:DeploymentConfigurationFile
    Sunday, March 20, 2011 8:19 PM

Answers

  • Objects are excluded (by selecting not in build in the properties section) at a project level. When you do a deploy from within visual studio it compiles the project to a dbschema file first and then deploys it to the target server.

    It is at the point that the project is compiled to a dbschema file that the objects are excluded.

    When you use vsdbcmd it takes a dbschema file and deploys it to the target server. So any objects that you want excluded should have already been excluded at a project level before creating the dbschema file. There  is no way to do it directly from vsdbcmd

     

    Anthony

    Monday, March 21, 2011 12:18 PM