SQL Change Automation 4

Import-DatabaseReleaseArtifact

Imports a Release Artifact, exported to disk by Export-DatabaseReleaseArtifact, from a folder or .zip file.

Syntax

Import-DatabaseReleaseArtifact [-Path] <string> [<CommonParameters>]

Description

The Import-DatabaseReleaseArtifact cmdlet re-imports the release artifact that has been exported to a folder or .zip file by the Export-DatabaseReleaseArtifact cmdlet.

The IReleaseArtifact object produced can then be used by the Use-DatabaseReleaseArtifact cmdlet to deploy the update.

Parameters

-Path <System.String>

The path to the folder or .zip file you want to import.

Aliases None
Required? true
Position? 0
Default Value None
Accept Pipeline Input false
Accept Wildcard Characters false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see http://technet.microsoft.com/en-us/library/hh847884.aspx.

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

  • None.
    You cannot pipe input to this cmdlet.

Return values

The output type is the type of the objects that the cmdlet emits.

  • RedGate.Versioning.Automation.Compare.Domain.ReleaseArtifacts.IReleaseArtifact

Examples

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

$release = Import-DatabaseReleaseArtifact -Path "C:\Work\DatabaseRelease\"

This example shows how to import a folder to create the database deployment resources.

The Import-DatabaseReleaseArtifact cmdlet imports the folder C:\Work\DatabaseRelease\, creating the database deployment resources. This folder was created by exporting to C:\Work\DatabaseRelease\ using the Export-DatabaseReleaseArtifact cmdlet.

Using Export-DatabaseReleaseArtifact and Import-DatabaseReleaseArtifact like this allows you to review the update script before you deploy with SQL Change Automation.

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

$release = Import-DatabaseReleaseArtifact -Path "C:\Work\DatabaseRelease.zip"

This example shows how to import a .zip file to create the database deployment resources.

The Import-DatabaseReleaseArtifact cmdlet imports the .zip file C:\Work\DatabaseRelease.zip, creating the database deployment resources.


Didn't find what you were looking for?