Create a DACPAC to only update not replace a SQL Server Database

  • Hi there

    We have been creating a DACPAC from a SQL server database project withing .Net Rider using the

    SQL Package command.

    This has been removing and replacing the database on target machines.

    But is there a way to just update a database rather than replace it?

    Can this be done by creating a dacpac which just has updated objects...or to place a switch in the

    SQLPackage command to update the database only?

  • Yes there is.

    SQLPackage /Action:Publish, with appropriate parameters.

    Set the CreateNewDatabase flag to false.

    The absence of evidence is not evidence of absence
    - Martin Rees
    The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
    - Phil Parkin

  • thanks Phil

    I tried this in my arguments

    /p:CreateNewDatabase:False

     

    and i got the following error message:

    'CreateNewDatabase:False' is not a valid argument for the 'Publish' action.

  • sorry Phil.. I figured it out

    /p:CreateNewDatabase=False

     

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply