Invoke-sqmSsisCatalogMigration
This command runs the whole documented sequence once and reports every step: assessment of both sides, master key and database backup, catalog creation on the destination, restore, post-restore fix-up, and the schema comparison. Nothing on the source is changed at any point - the source catalog stays online and usable, and the only source-side operations are reads plus two backups.
The catalog is created on the destination before the restore, deliberately: creating it installs the CLR assemblies and the server-level SSIS objects that live outside SSISDB (
sp_ssis_startup in master, the SSIS Server Maintenance Job in the Agent), and a database restore does not bring those along.
Every hit on the master key is verified by state, not by return code. After re-encrypting,
is_master_key_encrypted_by_server is read back; statements that ran without error but left the flag at 0 are reported as a failure, because SSIS would then ask for the password on every access.
Parameters
| Parameter | Type | Required | Default | Notes |
|---|---|---|---|---|
| -SourceSqlInstance | string | Required | — | Instance holding the catalog to migrate. |
| -SourceSqlCredential | PSCredential | Optional | — | Credential for the source connection. |
| -DestinationSqlInstance | string | Required | — | Instance that receives the catalog. Must be the same or a higher SQL Server major version - a backup cannot be restored downlevel, and such a run is refused. |
| -DestinationSqlCredential | PSCredential | Optional | — | Credential for the destination connection. |
| -CatalogPassword | SecureString | Optional | — | The SSISDB master key password. Required for everything except -AssessOnly; without it the encrypted content of the catalog cannot be carried over. |
| -KeyFilePassword | SecureString | Optional | -CatalogPassword | Password protecting the exported master key file. Set it when the key backup is handed over separately from the catalog password. |
| -SharedPath | string | Optional | source default backup dir | Directory for the SSISDB backup and the key file, reachable by both instances. Both files are written by the respective SQL Server service account, so that account needs write access. |
| -DestinationDataPath | string | Optional | destination default | Target directory for the SSISDB data file. |
| -DestinationLogPath | string | Optional | destination default | Target directory for the SSISDB log file. |
| -AssessOnly | switch | Switch | $false | Assess both sides and report what would happen, including blockers. Changes nothing anywhere. |
| -UseKeyBackupRestore | switch | Switch | $false | Re-key with RESTORE MASTER KEY FROM FILE instead of OPEN + ADD ENCRYPTION BY SERVICE MASTER KEY. Only needed when the restored key cannot be opened with -CatalogPassword. Restoring over an existing key requires FORCE, so this additionally requires -Force. |
| -UpgradeCatalog | switch | Switch | $false | Run the schema upgrade when the restored catalog is older than the destination server. Without it, the need is reported but nothing is run. |
| -UpgradeWizardPath | string | Optional | auto-detected | Path to ISDBUpgradeWizard.exe. Without it, the highest-numbered copy under <ProgramFiles>\Microsoft SQL Server\<nnn>\DTS\Binn\ on the machine running the command is used. |
| -UpgradeWizardArgument | string[] | Optional | -S <destination> -q | Argument list for the wizard. Override it when your build expects a different syntax - the result is verified by re-reading the schema version, so a wrong argument list shows up as "upgrade did not take effect". |
| -SkipAgentJobScan | switch | Switch | $false | Skip the scan for Agent jobs that start packages from the catalog. That scan does not touch the migration; it lists the jobs on the source that will have to be repointed. |
| -Force | switch | Switch | $false | Allow an existing destination SSISDB to be overwritten, and allow the FORCE variant of RESTORE MASTER KEY. |
| -OutputPath | string | Optional | <config>\SsisCatalogMigration | Directory for the HTML report. |
| -NoOpen / -NoReport | switch | Switch | $false | Do not open the report / do not write one at all. |
| -EnableException | switch | Switch | $false | Throw immediately instead of returning a result object with Status 'Failed'. |
-WhatIf and -Confirm (ConfirmImpact High). Every change on either instance goes through ShouldProcess, so a -WhatIf run prints the complete ordered list of changes it would make and performs none of them.Execution Flow
Examples
Invoke-sqmSsisCatalogMigration -SourceSqlInstance "SQLOLD" -DestinationSqlInstance "SQLNEW" -AssessOnly
$pw = Read-Host "SSISDB master key password" -AsSecureString
Invoke-sqmSsisCatalogMigration -SourceSqlInstance "SQLOLD" -DestinationSqlInstance "SQLNEW" `
-CatalogPassword $pw -SharedPath "\\fileserver\sqlmove" -WhatIf
Invoke-sqmSsisCatalogMigration -SourceSqlInstance "SQLOLD" -DestinationSqlInstance "SQLNEW" `
-CatalogPassword $pw -SharedPath "\\fileserver\sqlmove" -UpgradeCatalog
$r = Invoke-sqmSsisCatalogMigration -SourceSqlInstance "SQLOLD" -DestinationSqlInstance "SQLNEW" -AssessOnly $r.AgentJobsToRepoint | Format-Table JobName, StepName, Subsystem, LineText
$r = Invoke-sqmSsisCatalogMigration -SourceSqlInstance "SQLOLD" -DestinationSqlInstance "SQLNEW" `
-CatalogPassword $pw -SharedPath "\\fileserver\sqlmove"
$r.Status
$r.Steps | Format-Table Timestamp, Step, Status, Detail -AutoSize
Invoke-sqmSsisCatalogMigration -SourceSqlInstance "SQLOLD" -DestinationSqlInstance "SQLNEW" `
-CatalogPassword $pw -SharedPath "\\fileserver\sqlmove" -Force
Notes
What this does not do. It does not touch the source catalog, it does not repoint SQL Agent jobs (it lists them), and it does not move the SSIS service configuration or file system packages - only the catalog. Packages stored in the file system or in MSDB are a different migration.
RESTORE MASTER KEY alone is not enough. Measured on a real instance: after RESTORE MASTER KEY FROM FILE the key is protected by its password only - is_master_key_encrypted_by_server stays 0 - so the service master key encryption has to be added afterwards. Restoring over an existing key additionally requires FORCE, which discards whatever the old key still protects; that is why -UseKeyBackupRestore refuses to run without -Force instead of quietly forcing.
The upgrade wizard is a Windows tool, not T-SQL. It has to run on a machine that can reach the destination instance. If it is not found, the required manual step (SSMS → Integration Services Catalogs → SSISDB → Upgrade...) is named in the result instead of failing silently.