commands

^

Copy-DbaSsisCatalog

Author Phil Schwartz (philschwartz.me, @pschwartzzz)
Availability Windows, Linux, macOS

 

Want to see the source code for this command? Check out Copy-DbaSsisCatalog on GitHub.
Want to see the Bill Of Health for this command? Check out Copy-DbaSsisCatalog.

Synopsis

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

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.

Syntax

Copy-DbaSsisCatalog
    [-Source] <DbaInstanceParameter>
    [-Destination] <DbaInstanceParameter[]>
    [[-SourceSqlCredential] <PSCredential>]
    [[-DestinationSqlCredential] <PSCredential>]
    [[-Project] <String>]
    [[-Folder] <String>]
    [[-Environment] <String>]
    [[-CreateCatalogPassword] <SecureString>]
    [-EnableSqlClr]
    [-Force]
    [-EnableException]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

 

Examples

 

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.

Required Parameters

-Source

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

Alias
Required True
Pipeline false
Default Value
-Destination

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

Alias
Required True
Pipeline false
Default Value

Optional Parameters

-SourceSqlCredential

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.

Alias
Required False
Pipeline false
Default Value
-DestinationSqlCredential

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.

Alias
Required False
Pipeline false
Default Value
-Project

Specifies a source Project name.

Alias
Required False
Pipeline false
Default Value
-Folder

Specifies a source folder name.

Alias
Required False
Pipeline false
Default Value
-Environment

Specifies an environment to copy.

Alias
Required False
Pipeline false
Default Value
-CreateCatalogPassword

Specifies a secure string to use in creating an SSISDB catalog on Destination. If this is specified, prompts for the password will be skipped.

Alias
Required False
Pipeline false
Default Value
-EnableSqlClr

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.

Alias
Required False
Pipeline false
Default Value False
-Force

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

Alias
Required False
Pipeline false
Default Value False
-EnableException

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.

Alias
Required False
Pipeline false
Default Value False
-WhatIf

If this switch is enabled, no actions are performed but informational messages will be displayed that explain what would happen if the command were to run.

Alias wi
Required False
Pipeline false
Default Value
-Confirm

If this switch is enabled, you will be prompted for confirmation before executing any operations that change state.

Alias cf
Required False
Pipeline false
Default Value