Edit

Share via


Set-AzSqlElasticJobStep

Updates a job step

Syntax

DefaultSet (Default)

Set-AzSqlElasticJobStep
    [-ResourceGroupName] <String>
    [-ServerName] <String>
    [-AgentName] <String>
    [-JobName] <String>
    -Name <String>
    [-OutputDatabaseObject <AzureSqlDatabaseModel>]
    [-OutputCredentialName <String>]
    [-OutputTableName <String>]
    [-OutputSchemaName <String>]
    [-TargetGroupName <String>]
    [-CredentialName <String>]
    [-CommandText <String>]
    [-StepId <Int32>]
    [-TimeoutSeconds <Int32>]
    [-RetryAttempts <Int32>]
    [-InitialRetryIntervalSeconds <Int32>]
    [-MaximumRetryIntervalSeconds <Int32>]
    [-RetryIntervalBackoffMultiplier <Double>]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

WithRemoveOutput

Set-AzSqlElasticJobStep
    [-ResourceGroupName] <String>
    [-ServerName] <String>
    [-AgentName] <String>
    [-JobName] <String>
    -Name <String>
    [-RemoveOutput]
    [-TargetGroupName <String>]
    [-CredentialName <String>]
    [-CommandText <String>]
    [-StepId <Int32>]
    [-TimeoutSeconds <Int32>]
    [-RetryAttempts <Int32>]
    [-InitialRetryIntervalSeconds <Int32>]
    [-MaximumRetryIntervalSeconds <Int32>]
    [-RetryIntervalBackoffMultiplier <Double>]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

WithAddOutput

Set-AzSqlElasticJobStep
    [-ResourceGroupName] <String>
    [-ServerName] <String>
    [-AgentName] <String>
    [-JobName] <String>
    -Name <String>
    -OutputDatabaseResourceId <String>
    [-OutputCredentialName <String>]
    [-OutputTableName <String>]
    [-OutputSchemaName <String>]
    [-TargetGroupName <String>]
    [-CredentialName <String>]
    [-CommandText <String>]
    [-StepId <Int32>]
    [-TimeoutSeconds <Int32>]
    [-RetryAttempts <Int32>]
    [-InitialRetryIntervalSeconds <Int32>]
    [-MaximumRetryIntervalSeconds <Int32>]
    [-RetryIntervalBackoffMultiplier <Double>]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

ObjectSet

Set-AzSqlElasticJobStep
    [-InputObject] <AzureSqlElasticJobStepModel>
    [-OutputDatabaseObject <AzureSqlDatabaseModel>]
    [-OutputCredentialName <String>]
    [-OutputTableName <String>]
    [-OutputSchemaName <String>]
    [-TargetGroupName <String>]
    [-CredentialName <String>]
    [-CommandText <String>]
    [-StepId <Int32>]
    [-TimeoutSeconds <Int32>]
    [-RetryAttempts <Int32>]
    [-InitialRetryIntervalSeconds <Int32>]
    [-MaximumRetryIntervalSeconds <Int32>]
    [-RetryIntervalBackoffMultiplier <Double>]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

WithRemoveOutputUsingParentObject

Set-AzSqlElasticJobStep
    [-InputObject] <AzureSqlElasticJobStepModel>
    [-RemoveOutput]
    [-TargetGroupName <String>]
    [-CredentialName <String>]
    [-CommandText <String>]
    [-StepId <Int32>]
    [-TimeoutSeconds <Int32>]
    [-RetryAttempts <Int32>]
    [-InitialRetryIntervalSeconds <Int32>]
    [-MaximumRetryIntervalSeconds <Int32>]
    [-RetryIntervalBackoffMultiplier <Double>]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

WithAddOutputUsingParentObject

Set-AzSqlElasticJobStep
    [-InputObject] <AzureSqlElasticJobStepModel>
    -OutputDatabaseResourceId <String>
    [-OutputCredentialName <String>]
    [-OutputTableName <String>]
    [-OutputSchemaName <String>]
    [-TargetGroupName <String>]
    [-CredentialName <String>]
    [-CommandText <String>]
    [-StepId <Int32>]
    [-TimeoutSeconds <Int32>]
    [-RetryAttempts <Int32>]
    [-InitialRetryIntervalSeconds <Int32>]
    [-MaximumRetryIntervalSeconds <Int32>]
    [-RetryIntervalBackoffMultiplier <Double>]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

ResourceIdSet

Set-AzSqlElasticJobStep
    [-ResourceId] <String>
    [-OutputDatabaseObject <AzureSqlDatabaseModel>]
    [-OutputCredentialName <String>]
    [-OutputTableName <String>]
    [-OutputSchemaName <String>]
    [-TargetGroupName <String>]
    [-CredentialName <String>]
    [-CommandText <String>]
    [-StepId <Int32>]
    [-TimeoutSeconds <Int32>]
    [-RetryAttempts <Int32>]
    [-InitialRetryIntervalSeconds <Int32>]
    [-MaximumRetryIntervalSeconds <Int32>]
    [-RetryIntervalBackoffMultiplier <Double>]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

WithRemoveOutputUsingParentResourceId

Set-AzSqlElasticJobStep
    [-ResourceId] <String>
    [-RemoveOutput]
    [-TargetGroupName <String>]
    [-CredentialName <String>]
    [-CommandText <String>]
    [-StepId <Int32>]
    [-TimeoutSeconds <Int32>]
    [-RetryAttempts <Int32>]
    [-InitialRetryIntervalSeconds <Int32>]
    [-MaximumRetryIntervalSeconds <Int32>]
    [-RetryIntervalBackoffMultiplier <Double>]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

WithAddOutputUsingParentResourceId

Set-AzSqlElasticJobStep
    [-ResourceId] <String>
    -OutputDatabaseResourceId <String>
    [-OutputCredentialName <String>]
    [-OutputTableName <String>]
    [-OutputSchemaName <String>]
    [-TargetGroupName <String>]
    [-CredentialName <String>]
    [-CommandText <String>]
    [-StepId <Int32>]
    [-TimeoutSeconds <Int32>]
    [-RetryAttempts <Int32>]
    [-InitialRetryIntervalSeconds <Int32>]
    [-MaximumRetryIntervalSeconds <Int32>]
    [-RetryIntervalBackoffMultiplier <Double>]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

The Set-AzSqlElasticJobStep cmdlet updates a job step

Examples

Example 1: Updates a job step's target group for a job

$jobStep = Get-AzSqlElasticJobStep -ResourceGroupName rg -ServerName elasticjobserver -AgentName agent -JobName job1 -StepName step1
$jobStep | Set-AzSqlElasticJobStep -TargetGroupName tg2
JobName StepName StepId TargetGroupName CredentialName Output ExecutionOptions   CommandText
------- -------- ------ --------------- -------------- ------ ----------------   -----------
job1    step1    1      tg2             cred1                 (43200,10,1,120,2) SELECT 1

Example 2: Updates a job step's T-SQL script for a job

$jobStep = Get-AzSqlElasticJobStep -ResourceGroupName rg -ServerName elasticjobserver -AgentName agent -JobName job1 -StepName step1
$jobStep | Set-AzSqlElasticJobStep -CommandText "SELECT 2"
JobName StepName StepId TargetGroupName CredentialName Output ExecutionOptions   CommandText
------- -------- ------ --------------- -------------- ------ ----------------   -----------
job1    step1    1      tg1             cred1                 (43200,10,1,120,2) SELECT 2

Updates a job step from a job

Example 3

Set-AzSqlElasticJobStep -AgentName agent -CommandText 'SELECT 2' -JobName job1 -Name step1 -ResourceGroupName MyResourceGroup -ServerName s1

Parameters

-AgentName

The agent name

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

DefaultSet
Position:2
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
WithRemoveOutput
Position:2
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
WithAddOutput
Position:2
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-CommandText

The command text

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Parameter properties

Type:SwitchParameter
Default value:False
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-CredentialName

The credential name

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with Azure.

Parameter properties

Type:IAzureContextContainer
Default value:None
Supports wildcards:False
DontShow:False
Aliases:AzContext, AzureRmContext, AzureCredential

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-InitialRetryIntervalSeconds

The initial retry interval seconds

Parameter properties

Type:

Nullable<T>[Int32]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-InputObject

The job step object

Parameter properties

Type:AzureSqlElasticJobStepModel
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ObjectSet
Position:0
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False
WithRemoveOutputUsingParentObject
Position:0
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False
WithAddOutputUsingParentObject
Position:0
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-JobName

The job name

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

DefaultSet
Position:3
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
WithRemoveOutput
Position:3
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
WithAddOutput
Position:3
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-MaximumRetryIntervalSeconds

The maximum retry interval seconds

Parameter properties

Type:

Nullable<T>[Int32]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Name

The step name

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False
Aliases:StepName

Parameter sets

DefaultSet
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
WithRemoveOutput
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
WithAddOutput
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-OutputCredentialName

The output credential name

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

DefaultSet
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
WithAddOutput
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
ObjectSet
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
WithAddOutputUsingParentObject
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
ResourceIdSet
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
WithAddOutputUsingParentResourceId
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-OutputDatabaseObject

The output database object

Parameter properties

Type:AzureSqlDatabaseModel
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

DefaultSet
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
ObjectSet
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
ResourceIdSet
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-OutputDatabaseResourceId

The output database resource id

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

WithAddOutput
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
WithAddOutputUsingParentObject
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
WithAddOutputUsingParentResourceId
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-OutputSchemaName

The output schema name

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

DefaultSet
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
WithAddOutput
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
ObjectSet
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
WithAddOutputUsingParentObject
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
ResourceIdSet
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
WithAddOutputUsingParentResourceId
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-OutputTableName

The output table name

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

DefaultSet
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
WithAddOutput
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
ObjectSet
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
WithAddOutputUsingParentObject
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
ResourceIdSet
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
WithAddOutputUsingParentResourceId
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-RemoveOutput

The flag to indicate whether to remove output

Parameter properties

Type:SwitchParameter
Default value:False
Supports wildcards:False
DontShow:False

Parameter sets

WithRemoveOutput
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
WithRemoveOutputUsingParentObject
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
WithRemoveOutputUsingParentResourceId
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ResourceGroupName

The resource group name

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

DefaultSet
Position:0
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
WithRemoveOutput
Position:0
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
WithAddOutput
Position:0
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ResourceId

The job step resource id

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ResourceIdSet
Position:0
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False
WithRemoveOutputUsingParentResourceId
Position:0
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False
WithAddOutputUsingParentResourceId
Position:0
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-RetryAttempts

The retry attempts

Parameter properties

Type:

Nullable<T>[Int32]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-RetryIntervalBackoffMultiplier

The retry interval backoff multiplier

Parameter properties

Type:

Nullable<T>[Double]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ServerName

The server name

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

DefaultSet
Position:1
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
WithRemoveOutput
Position:1
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
WithAddOutput
Position:1
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-StepId

The step id text

Parameter properties

Type:

Nullable<T>[Int32]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-TargetGroupName

The target group name

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-TimeoutSeconds

The timeout seconds

Parameter properties

Type:

Nullable<T>[Int32]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Parameter properties

Type:SwitchParameter
Default value:False
Supports wildcards:False
DontShow:False
Aliases:wi

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

AzureSqlElasticJobStepModel

Outputs

AzureSqlElasticJobStepModel