SQL Release

How do I include identical objects in my change report?

By default the Changes.html report that's created as part of the database deployment resource doesn't include identical objects. You can include them by adding a parameter to the New-DlmDatabaseRelease cmdlet or the Octopus Deploy step template.

Using PowerShell cmdlets

In the New-DlmDatabaseRelease cmdlet, add the -IncludeIdenticalsInReport parameter:


New-DlmDatabaseRelease -Source $test -Target $staging -IncludeIdenticalsInReport

Using Octopus Deploy step templates

In SQL Release, an Include identical objects in the change report parameter was added to the Redgate - Create Database Release step template. This version of the step template was published to the Octopus Deploy library on July 8th 2015. If you're using an earlier version, this parameter won't be available. Instead, you can edit your existing template and add a parameter for including identicals:

  1. In Octopus Deploy, click Library.
  2. Go to the Step templates tab.
  3. Click on the Redgate – Create Database Release template. 
  4. In the PowerShell script, in the four instance of the New-DatabaseRelease cmdlet, add the -IncludeIdenticalsInReport parameter before the -Verbose parameter. That section of the script should then look like this:


    # Create the deployment resources from the database to the NuGet package
    if ($SQLReleaseFilterPath) {
        if ($SQLReleaseCompareOptions) {
            $release = New-DatabaseRelease -Target $targetDB -Source $databaseStatePath -TransactionIsolationLevel $SQLReleaseTransactionIsolationLevel -IgnoreStaticData:$ignoreStaticData -FilterPath $SQLReleaseFilterPath -SQLCompareOptions $SQLReleaseCompareOptions -IncludeIdenticalsInReport -Verbose
        } else {
            $release = New-DatabaseRelease -Target $targetDB -Source $databaseStatePath -TransactionIsolationLevel $SQLReleaseTransactionIsolationLevel -IgnoreStaticData:$ignoreStaticData -FilterPath $SQLReleaseFilterPath -IncludeIdenticalsInReport -Verbose
    } else {
        if ($SQLReleaseCompareOptions) {
            $release = New-DatabaseRelease -Target $targetDB -Source $databaseStatePath -TransactionIsolationLevel $SQLReleaseTransactionIsolationLevel -IgnoreStaticData:$ignoreStaticData -SQLCompareOptions $SQLReleaseCompareOptions -IncludeIdenticalsInReport -Verbose
        } else {
            $release = New-DatabaseRelease -Target $targetDB -Source $databaseStatePath -TransactionIsolationLevel $SQLReleaseTransactionIsolationLevel -IgnoreStaticData:$ignoreStaticData -IncludeIdenticalsInReport -Verbose
  5. Click Save.

You'll also need to update the project step:

  1. Click Projects and select the project that needs updating.
  2. Go to the Process tab and select the Redgate – Create Database Release step.
  3. Click Update.

Didn't find what you were looking for?