In the SQLCompare product, it is easy to have it ignore the minor differences of Indexes with or without the FILLFACTOR or STATISICS_NORECOMPUTE settings, so that those objects do not show as needed migrated. How can I make the same settings in SQL Change Automation to ignore these minor differences?
Here is the PowerShell script used to generate a ReleaseArtifact object between two databases, and export that to disk for inspection. It runs without issue, and I've been able to exclude most everything by tweeking my *.scpf Filter File (also used with SQLCompare), but that does not have separate controls for indexes and constraints.
[string]$ExportFolder = "C:\SCA\Export";
[string]$SQLCompareFilter = "C:\SCA\SCA-FilterSettings.scpf";
#empty the export folder
Remove-Item $ExportFolder -Recurse -Force -Confirm:$false;
$SourceConnection = New-DatabaseConnection -ServerInstance "s-sw-sqldev" -Database "demoDEV";
$TargetConnection = New-DatabaseConnection -ServerInstance "s-sw-sqltest" -Database "demoTEST";
$iReleaseArtifact = New-DatabaseReleaseArtifact `
-Source $SourceConnection `
-Target $TargetConnection `
-SQLCompareOptions 'NoTransactions' `
-FilterPath $SQLCompareFilter `
Export-DatabaseReleaseArtifact $iReleaseArtifact -Path $ExportFolder
# clean up objects
# open the report html file in Chrome
Start-Process "chrome.exe" "$('file:///' + $ExportFolder + '/Reports/Changes.html#changes')"
The long term goal is (obviously) to use source control as the "Source" for New-DatabaseReleaseArtifact, but I'm new to SCA and trying to step through this manually first with as few moving parts as possible.