-
Notifications
You must be signed in to change notification settings - Fork 3
Unpublish SsisDeployment
Rollback ispac deployment: reverts to previous version of deployed project.
Unpublish-SsisDeployment [-jsonPsCustomObject] <PSObject> [-sqlConnection] <SqlConnection>
[[-ssisFolderName] <String>] [[-ssisProjectName] <String>] [[-ssisProjectLsn] <String>] [-delete]
[<CommonParameters>]
If a validate project has failed and we wish to rollback we needto revert to previous working project First it checks that you can rollback (ie previous versions are stored)
$ssisLatestProjectLsn = Get-SsisProjectLsn -ssisPublishFilePath $thisSsisPublishFilePath -sqlConnection $ssisdb
do deployment....
do validation...
validation fails...
if ($null -eq $ssisLatestProjectLsn) {
Unpublish-SsisDeployment -ssisPublishFilePath $thisSsisPublishFilePath -sqlConnection $ssisdb -ssisProjectLsn $ssisLatestProjectLsn
}
else {
Unpublish-SsisDeployment -ssisPublishFilePath $thisSsisPublishFilePath -sqlConnection $ssisdb -delete
}
Tested json object loaded from Import-Json
Type: PSObject
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The SQL Connection to SSISDB
Type: SqlConnection
Parameter Sets: (All)
Aliases:
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Optional parameter. We may wish to override the value of what is in the json file.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Optional parameter. We may wish to override the value of what is in the json file.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Retrieved from ISC by using Get-SsisProjectLsn function.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 5
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Optional parameter. Will delete a project. Can be used when there is no project version to roll back to. Or can be used as a nucelar option.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: 6
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.