Options

Create and Deploy release with options

crogecroge Posts: 3
edited June 27, 2016 7:52AM in DLM Automation
I'm calling the redgate built "Redgate - create Database Release" and then "Redgate - Deploy from Database Release" in ocopus and I'm struggling to get the options to pass through,

I want to ignore dependencies, which means I need to pass all other defaults to the Create powershell, which is fine, I've got that (although it took a while to find). But now when I do the deployment, I lose the specific options I've asked for and all the dependencies are being rolled out.

Calling: C:Program Files (x86)Red GateDLM Automation Suite 1SCSQLCompare.exe
"/filter:C:Userssvc_OctopusDeployAppDataLocalTempSQL Releaseym0ciaoj.scpf"
/options:ConsiderNextFilegroupInPartitionSchemes,DecryptPost2kEncryptedObjects,DoNotOutputCommentHeader,ForceColumnOrder,IgnoreCertificatesAndCryptoKeys,IgnoreDatabaseAndServerName,IgnoreFileGroups,IgnoreFillFactor,IgnoreTSQLT,IgnoreUserProperties,IgnoreUsersPermissionsAndRoleMemberships,IgnoreWhiteSpace,IgnoreWithElementOrder,IncludeDependencies,ThrowOnFileParseFailed,UseCompatibilityLevel,UseMigrationsV2

Am I missing another option somewhere?

It doesn't seem right that the options I've specified are ignored.

Cheers
Chris

Comments

  • Options
    Actuall, what I've noticed is that the New-DatabaseRelease / New-DlmDatabaseRelease calls SQLCompare.exe twice and that has "IncludeDepenencis" as a default as well as others.

    I see no way to override these even though I'm explicitly passing in some SQL compare options: below is the chunk of extract info from Octopus (apologies for the formatting)

    WARNING: 'New-DatabaseConnection' has been renamed 'New-DlmDatabaseConnection'.
    WARNING: 'Test-DatabaseConnection' has been renamed 'Test-DlmDatabaseConnection'.
    New-DatabaseConnection, SQL Release 1.3.16.1507, Copyright © Red Gate Software Ltd 2014-2016
    Test-DatabaseConnection, SQL Release 1.3.16.1507, Copyright © Red Gate Software Ltd 2014-2016
    *******************SQL COMPARE OPTIONS***************************
    DecryptPost2KEncryptedObjects,IgnoreFillFactor,IgnoreWhiteSpace,IgnoreFileGroups,IgnoreUserProperties,IgnoreWithElementOrder,IgnoreDatabaseAndServerName
    WARNING: 'New-DatabaseRelease' has been renamed 'New-DlmDatabaseRelease'.
    New-DatabaseRelease, SQL Release 1.3.16.1507, Copyright © Red Gate Software Ltd 2014-2016
    VERBOSE: Parameters:
    Source: scripts folder 'D:OctopusApplicationsTestCCS.COC.Database9127.6_1dbstate'
    Target: database 'CCS' on server '10.51.42.184'
    FilterPath: null
    IgnoreStaticData: True
    SQLCompareOptions:
    DecryptPost2KEncryptedObjects,IgnoreFillFactor,IgnoreWhiteSpace,IgnoreFileGroups,IgnoreUserProperties,IgnoreWithElement
    Order,IgnoreDatabaseAndServerName
    TransactionIsolationLevel: Serializable
    IncludeIdenticalsInReport: False
    TemporaryDatabaseServer: null
    VERBOSE: Using filter in scripts folder 'D:OctopusApplicationsTestCCS.COC.Database9127.6_1dbstate'
    Making a scripts folder of database 'CCS' on server '10.51.42.184'.
    VERBOSE: Calling: C:Program Files (x86)Red GateDLM Automation Suite 1SCSQLCompare.exe
    "/makescripts:C:Userssvc_OctopusDeployAppDataLocalTempSQL Releaseum0zi3ds.hhz" /force
    /options:DecryptPost2kEncryptedObjects,IncludeDependencies /OutputWidth:1024 /server1:10.51.42.184 /database1:CCS
    /out:"C:Userssvc_OctopusDeployAppDataLocalTempSQL Releasevj5qfzd0.log"
    VERBOSE: C:Program Files (x86)Red GateDLM Automation Suite 1SCSQLCompare.exe ended with exit code 0
    VERBOSE: SQLCompare.exe completed successfully.
    Creating the update script.
    VERBOSE: Calling: C:Program Files (x86)Red GateDLM Automation Suite 1SCSQLCompare.exe
    "/filter:C:Userssvc_OctopusDeployAppDataLocalTempSQL Releasek30pu2mj.scpf"
    /options:ConsiderNextFilegroupInPartitionSchemes,DecryptPost2kEncryptedObjects,DoNotOutputCommentHeader,ForceColumnOrde
    r,IgnoreCertificatesAndCryptoKeys,IgnoreDatabaseAndServerName,IgnoreFileGroups,IgnoreFillFactor,IgnoreTSQLT,IgnoreUserP
    roperties,IgnoreUsersPermissionsAndRoleMemberships,IgnoreWhiteSpace,IgnoreWithElementOrder,IncludeDependencies,ThrowOnF
    ileParseFailed,UseCompatibilityLevel,UseMigrationsV2 /transactionIsolationLevel:SERIALIZABLE
    "/scriptFile:C:Userssvc_OctopusDeployAppDataLocalTempSQL Releasepm5djgh0.sql" /showWarnings /include:Identical
    "/report:C:Userssvc_OctopusDeployAppDataLocalTempSQL Releasewm41m4rw.xml" /reportType:Xml /force
    /OutputWidth:1024 "/scripts1:C:Userssvc_OctopusDeployAppDataLocalTempSQL Releasekogbgz4i.qvj"
    "/scripts2:C:Userssvc_OctopusDeployAppDataLocalTempSQL Release ufznnyn.thb"
    /out:"C:Userssvc_OctopusDeployAppDataLocalTempSQL Release1mwwkjk0.log"
    VERBOSE: C:Program Files (x86)Red GateDLM Automation Suite 1SCSQLCompare.exe ended with exit code 0
    VERBOSE: SQLCompare.exe completed successfully.
    ************************** RedGate.SQLRelease.Compare.Domain.DatabaseRelease ****************************
  • Options
    Hi Chris,

    To turn off a default option you can precede the option with a minus sign, so you would add -IncludeDependencies to the "SQL Compare options" textbox in the Octopus step template.

    Have a look at the New-DlmDatabaseRelease syntax for more information - http://documentation.red-gate.com/displ ... aseRelease

    Having said that, you'll need to be careful as if you don't deploy dependencies then you are at risk of leaving the database in an invalid state.
    Software Engineer
    Redgate Software
Sign In or Register to comment.