Editar

Compartir a través de


Set-AzSqlElasticJobStep

Updates a job step

Syntax

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>]
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>]
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>]
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>]
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>]
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>]
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>]
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>]
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

Type:String
Position:2
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-CommandText

The command text

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

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:False
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-CredentialName

The credential name

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

-DefaultProfile

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

Type:IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-InitialRetryIntervalSeconds

The initial retry interval seconds

Type:Nullable<T>[Int32]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-InputObject

The job step object

Type:AzureSqlElasticJobStepModel
Position:0
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-JobName

The job name

Type:String
Position:3
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-MaximumRetryIntervalSeconds

The maximum retry interval seconds

Type:Nullable<T>[Int32]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Name

The step name

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

-OutputCredentialName

The output credential name

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

-OutputDatabaseObject

The output database object

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

-OutputDatabaseResourceId

The output database resource id

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

-OutputSchemaName

The output schema name

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

-OutputTableName

The output table name

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

-RemoveOutput

The flag to indicate whether to remove output

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

-ResourceGroupName

The resource group name

Type:String
Position:0
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-ResourceId

The job step resource id

Type:String
Position:0
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-RetryAttempts

The retry attemps

Type:Nullable<T>[Int32]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-RetryIntervalBackoffMultiplier

The retry interval backoff multiplier

Type:Nullable<T>[Double]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ServerName

The server name

Type:String
Position:1
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-StepId

The step id text

Type:Nullable<T>[Int32]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-TargetGroupName

The target group name

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

-TimeoutSeconds

The timeout seconds

Type:Nullable<T>[Int32]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-WhatIf

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

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:False
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

AzureSqlElasticJobStepModel

Outputs

AzureSqlElasticJobStepModel