How can we help you today? How can we help you today?

Deploy from RG Source Control: Don't want to drop objects

Hi, 
when deploying from build artifact,  is it possible to prevent dropping objects which don't exist on the source? 
Something like /exclude:Additional in SQL compare command line. 



Janez Trost
0

Comments

4 comments

  • Kendra_Little
    Hi JTR,

    Have you checked out New-DatabaseReleaseArtifact and Use-DatabaseReleaseArtifact?

    New-DatabaseReleaseArtifact has an -IgnoreAdditional option which sounds possibly like what you're looking for, the description is:
    Specifies whether to ignore additional objects in the target database. Enabling this prevents new and unexpected objects in the target being dropped - note that the checks and tests applied to this database may not have taken those objects into account and may therefore not be valid.
    This parameter can't be used simultaneously with filter files.

    If you know what the objects are that you'd like to skip, personally I'd test using -FilterPath on New-DatabaseReleaseArtifact to specify a filter file of what to ignore first, it seems cleaner to me.

    The great thing about these cmdlets is that you can export and review the database release artifact to make sure it's doing exactly what you want before using it anywhere. Very nice when it comes to testing which option is right for you.

    Kendra

    Kendra_Little
    0
  • JTR
    Hi Kendra,
    I'm currently trying with TFS task (RG Change Automation - Deploy changes from build artifact) and -IgnoreAdditional parameter is not exposed in UI. But I'll switch to using powershell cmdlets it this is the only way. 
    I want to prevent dropping because often someone creates some temporary table(which are eventually dropped).  For the known objects that shouldn't be deployed, I already tried filters and it works fine. 
    Thanks for help, 
    Janez
    JTR
    0
  • JTR
    Looks like  -IgnoreAdditional and -FilterPath are not compatible.
    JTR
    0
  • Kendra_Little
    Thanks for the extra info, JTR. You can do this in TFS as well -- there is a "SQL Change Automation: Release" plug-in which has these components / is the equivalent of these PowerShell cmdlets, just in case you haven't found that yet. 

    And yep, it's either filters or ignore additional. 
    Kendra_Little
    0

Add comment

Please sign in to leave a comment.