Set-AzureSqlJobContentDefinition
Sets the T-SQL script or DACPAC URI definition of content.
Syntax
Set-AzureSqlJobContentDefinition
-ContentName <String>
-CommandText <String[]>
[-Comment <String>]
[[-AzureSqlJobConnection] <AzureSqlJobConnection>]
[<CommonParameters>]
Set-AzureSqlJobContentDefinition
-ContentName <String>
-DacpacUri <Uri>
[-Comment <String>]
[[-AzureSqlJobConnection] <AzureSqlJobConnection>]
[<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.
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 |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-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 |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Comment
Specifies an optional comment describing the change to the content.
Type: | String |
Position: | Named |
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: | 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 |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |