< Back
Unpublish-SsisDeployment
Post
NAME Unpublish-SsisDeployment
SYNOPSIS
Rollback ispac deployment: reverts to previous version of deployed project.
SYNTAX
Unpublish-SsisDeployment [-jsonPsCustomObject] <PSObject> [-sqlConnection] <SqlConnection> [[-ssisFolderName]
<String>] [[-ssisProjectName] <String>] [[-ssisProjectLsn] <String>] [[-delete]] [<CommonParameters>]
DESCRIPTION
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)
PARAMETERS
-jsonPsCustomObject <PSObject>
Tested json object loaded from Import-Json
Required? true
Position? 1
Default value
Accept pipeline input? false
Accept wildcard characters? false
-sqlConnection <SqlConnection>
The SQL Connection to SSISDB
Required? true
Position? 2
Default value
Accept pipeline input? false
Accept wildcard characters? false
-ssisFolderName <String>
Optional parameter. We may wish to override the value of what is in the json file.
Required? false
Position? 3
Default value
Accept pipeline input? false
Accept wildcard characters? false
-ssisProjectName <String>
Optional parameter. We may wish to override the value of what is in the json file.
Required? false
Position? 4
Default value
Accept pipeline input? false
Accept wildcard characters? false
-ssisProjectLsn <String>
Retrieved from ISC by using Get-SsisProjectLsn function.
Required? false
Position? 5
Default value
Accept pipeline input? false
Accept wildcard characters? false
-delete [<SwitchParameter>]
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.
Required? false
Position? 6
Default value False
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>$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
}
RELATED LINKS
SYNOPSIS
Rollback ispac deployment: reverts to previous version of deployed project.
SYNTAX
Unpublish-SsisDeployment [-jsonPsCustomObject] <PSObject> [-sqlConnection] <SqlConnection> [[-ssisFolderName]
<String>] [[-ssisProjectName] <String>] [[-ssisProjectLsn] <String>] [[-delete]] [<CommonParameters>]
DESCRIPTION
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)
PARAMETERS
-jsonPsCustomObject <PSObject>
Tested json object loaded from Import-Json
Required? true
Position? 1
Default value
Accept pipeline input? false
Accept wildcard characters? false
-sqlConnection <SqlConnection>
The SQL Connection to SSISDB
Required? true
Position? 2
Default value
Accept pipeline input? false
Accept wildcard characters? false
-ssisFolderName <String>
Optional parameter. We may wish to override the value of what is in the json file.
Required? false
Position? 3
Default value
Accept pipeline input? false
Accept wildcard characters? false
-ssisProjectName <String>
Optional parameter. We may wish to override the value of what is in the json file.
Required? false
Position? 4
Default value
Accept pipeline input? false
Accept wildcard characters? false
-ssisProjectLsn <String>
Retrieved from ISC by using Get-SsisProjectLsn function.
Required? false
Position? 5
Default value
Accept pipeline input? false
Accept wildcard characters? false
-delete [<SwitchParameter>]
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.
Required? false
Position? 6
Default value False
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>$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
}
RELATED LINKS