Set-​Azure​Sql​Job​Content​Definition

Sets the T-SQL script or DACPAC URI definition of content.

Syntax

Set-AzureSqlJobContentDefinition
   [[-AzureSqlJobConnection] <AzureSqlJobConnection>]
   -CommandText <String[]>
   [-Comment <String>]
   -ContentName <String>
   [<CommonParameters>]
Set-AzureSqlJobContentDefinition
   [[-AzureSqlJobConnection] <AzureSqlJobConnection>]
   [-Comment <String>]
   -ContentName <String>
   -DacpacUri <Uri>
   [<CommonParameters>]

Description

The Set-AzureSqlJobContentDefinition cmdlet updates the Transact-SQL (T-SQL) script or DACPAC URI definition of content.

Examples

Example 1: Update a T-SQL script definition

PS C:\>Set-AzureSqlJobContentDefinition -ContentName "MyScript" -CommandText "SELECT DB_NAME();" -Comment "Updating the script to just select the database name"
CommandText                             ContentName                                                      VersionNumber Comment                               
-----------                             -----------                                                      ------------- -------                               
SELECT DB_NAME();                       MyScript                                                                     2 Updating the script to just select ...

This command updates the T-SQL script definition for the specified script content.

Required Parameters

-CommandText

Specifies the command text of a T-SQL script. The script can contain GO statements. When containing GO statements, the system will split the command text into multiple batches.

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

Specifies the name of the content.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-DacpacUri

Specifies the URI for a DACPAC to be used for application. The URI must be accessible by the system.

Type:Uri
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
-Comment

Specifies an optional comment describing the change to the content.

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