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.

    If you haven't even tried to resolve your issue, please don't expect the hard-working volunteers here to waste their time providing links to answers which you could easily have found yourself.

  • 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