Get-​Azure​Sql​Job​Content​Definition

Gets one or multiple content definitions that are run or applied across entities within a job target.

Syntax

Get-AzureSqlJobContentDefinition
   [[-AzureSqlJobConnection] <AzureSqlJobConnection>]
   [-AllVersions]
   -ContentName <String[]>
   [<CommonParameters>]
Get-AzureSqlJobContentDefinition
   [[-AzureSqlJobConnection] <AzureSqlJobConnection>]
   -ContentName <String[]>
   -Version <Int32>
   [<CommonParameters>]

Description

The Get-AzureSqlJobContentDefinition cmdlet gets one or multiple content definitions that are run or applied across entities within a job target.

The definition includes either the T-SQL script for T-SQL content or the DACPAC URI for DACPAC content.

Examples

Example 1: Get all versioned content definitions for a given content name

PS C:\>Get-AzureSqlJobContentDefinition -ContentName "CreateMyTestTable"
CommandText                   ContentName                                   VersionNumber Comment
-----------                   -----------                                   ------------- -------
IF NOT EXISTS (SELECT name... CreateMyTestTable                                         1

This command gets all versioned content definitions for a given content name.

Example 2: Get a specific versioned content definition for a given content name

PS C:\>Get-AzureSqlJobContentDefinition -ContentName "CreateMyTestTable" -Version 1
CommandText                   ContentName                                   VersionNumber Comment
-----------                   -----------                                   ------------- -------
IF NOT EXISTS (SELECT name... CreateMyTestTable                                         1

This command gets a specific versioned content definition for a given content name.

Required Parameters

-AllVersions

Indicates that all versions of the content's definitions are returned.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ContentName

Specifies the name of the content.

Type:String[]
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-Version

Specifies the particular version of content definition to return.

Type:Int32
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Optional Parameters

-AzureSqlJobConnection

Specifies the connection state object for the job. You can get the connection state object through the New-AzureSqlJobConnection cmdlet. If you do not specify this parameter, the connection state is used from a prior call to the Use-AzureSqlJobConnection cmdlet.

Type:AzureSqlJobConnection
Position:1
Default value:None
Accept pipeline input:False
Accept wildcard characters:False