Sdílet prostřednictvím


Get-AzureSqlJobContentDefinition

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

Syntax

Get-AzureSqlJobContentDefinition
   -ContentName <String[]>
   [[-AzureSqlJobConnection] <AzureSqlJobConnection>]
   [<CommonParameters>]
Get-AzureSqlJobContentDefinition
   -ContentName <String[]>
   [-AllVersions]
   [[-AzureSqlJobConnection] <AzureSqlJobConnection>]
   [<CommonParameters>]
Get-AzureSqlJobContentDefinition
   -ContentName <String[]>
   -Version <Int32>
   [[-AzureSqlJobConnection] <AzureSqlJobConnection>]
   [<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.

Parameters

-AllVersions

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

Type:SwitchParameter
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-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
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ContentName

Specifies the name of the content.

Type:String[]
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-Version

Specifies the particular version of content definition to return.

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