< Back

Copy-DbaSsisCatalog

Mon Jan 13, 2020 9:41 am

NAME Copy-DbaSsisCatalog



SYNOPSIS

Copy-DbaSsisCatalog migrates Folders, SSIS projects, and environments from one SQL Server to another.





SYNTAX

Copy-DbaSsisCatalog [-Source] <DbaInstanceParameter> [-Destination]

<Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]> [[-SourceSqlCredential] <Pscredential>]

[[-DestinationSqlCredential] <Pscredential>] [[-Project] <String>] [[-Folder] <String>] [[-Environment] <String>]

[[-CreateCatalogPassword] <Securestring>] [-EnableSqlClr <Switch>] [-Force <Switch>] [-EnableException <Switch>]

[<CommonParameters>]





DESCRIPTION

By default, all folders, projects, and environments are copied. The -Project parameter can be specified to copy

only one project, if desired.



The parameters get more granular from the Folder level. For example, specifying -Folder will only deploy

projects/environments from within that folder.





PARAMETERS

-CreateCatalogPassword [<Securestring>]

Specifies a secure string to use in creating an SSISDB catalog on Destination. If this is specified, prompts

for the password will be skipped.



Required? false

Position? named

Default value

Accept pipeline input? False

Accept wildcard characters? false



-Destination [<Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]>]

Destination SQL Server. You must have sysadmin access and the server must be SQL Server 2012 or higher.



Required? false

Position? named

Default value

Accept pipeline input? False

Accept wildcard characters? false



-DestinationSqlCredential [<Pscredential>]

Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential).



Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory -

Integrated are all supported.



For MFA support, please use Connect-DbaInstance.



Required? false

Position? named

Default value

Accept pipeline input? False

Accept wildcard characters? false



-EnableException [<Switch>]

By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message.

This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables

advanced scripting.

Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own

try/catch.



Required? false

Position? named

Default value

Accept pipeline input? False

Accept wildcard characters? false



-EnableSqlClr [<Switch>]

If this switch is enabled and Destination does not have the SQL CLR configuration option enabled, user prompts

for enabling it on Destination will be skipped. SQL CLR is required for SSISDB.



Required? false

Position? named

Default value

Accept pipeline input? False

Accept wildcard characters? false



-Environment [<String>]

Specifies an environment to copy.



Required? false

Position? named

Default value

Accept pipeline input? False

Accept wildcard characters? false



-Folder [<String>]

Specifies a source folder name.



Required? false

Position? named

Default value

Accept pipeline input? False

Accept wildcard characters? false



-Force [<Switch>]

If this switch is enabled, the SSIS Catalog will be dropped and recreated on Destination if it already exists.



Required? false

Position? named

Default value

Accept pipeline input? False

Accept wildcard characters? false



-Project [<String>]

Specifies a source Project name.



Required? false

Position? named

Default value

Accept pipeline input? False

Accept wildcard characters? false



-Source [<DbaInstanceParameter>]

Source SQL Server. You must have sysadmin access and server version must be SQL Server version 2012 or higher.



Required? false

Position? named

Default value

Accept pipeline input? False

Accept wildcard characters? false



-SourceSqlCredential [<Pscredential>]

Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential).



Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory -

Integrated are all supported.



For MFA support, please use Connect-DbaInstance.



Required? false

Position? named

Default value

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



NOTES





Tags: Migration, SSIS

Author: Phil Schwartz (philschwartz.me, @pschwartzzz)



dbatools PowerShell module (https://dbatools.io)

Copyright: (c) 2018 by dbatools, licensed under MIT

License: MIT https://opensource.org/licenses/MIT



-------------------------- EXAMPLE 1 --------------------------



PS C:\\>Copy-DbaSsisCatalog -Source sqlserver2014a -Destination sqlcluster



Copies all folders, environments and SSIS Projects from sqlserver2014a to sqlcluster, using Windows credentials to

authenticate to both instances. If folders with the same name exist on the destination they will be skipped, but

projects will be redeployed.

-------------------------- EXAMPLE 2 --------------------------



PS C:\\>Copy-DbaSsisCatalog -Source sqlserver2014a -Destination sqlcluster -Project Archive_Tables

-SourceSqlCredential $cred -Force



Copies a single Project, the Archive_Tables Project, from sqlserver2014a to sqlcluster using SQL credentials to

authenticate to sqlserver2014a and Windows credentials to authenticate to sqlcluster. If a Project with the same

name exists on sqlcluster, it will be deleted and recreated because -Force was used.

-------------------------- EXAMPLE 3 --------------------------



PS C:\\>Copy-DbaSsisCatalog -Source sqlserver2014a -Destination sqlcluster -WhatIf -Force



Shows what would happen if the command were executed using force.

-------------------------- EXAMPLE 4 --------------------------



PS C:\\>$SecurePW = Read-Host "Enter password" -AsSecureString



PS C:\\> Copy-DbaSsisCatalog -Source sqlserver2014a -Destination sqlcluster -CreateCatalogPassword $SecurePW



Deploy entire SSIS catalog to an instance without a destination catalog. User prompts for creating the catalog on

Destination will be bypassed.



RELATED LINKS

https://dbatools.io/Copy-DbaSsisCatalog