How do I include identical objects in my change report?
Published 23 June 2015
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:
Example
New-DlmDatabaseRelease -Source $test -Target $staging -IncludeIdenticalsInReport
Using Octopus Deploy step templates
In SQL Release 1.2.1.3062, 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:
- In Octopus Deploy, click Library.
- Go to the Step templates tab.
- Click on the Redgate – Create Database Release template.
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:
Example
# 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 } }
- Click Save.
You'll also need to update the project step:
- Click Projects and select the project that needs updating.
- Go to the Process tab and select the Redgate – Create Database Release step.
- Click Update.