Set-​Azure​Sql​Job

Updates a job definition.

Syntax

Set-AzureSqlJob
   [[-AzureSqlJobConnection] <AzureSqlJobConnection>]
   [-ContentName <String>]
   [-CredentialName <String>]
   [-ExecutionPolicyName <String>]
   -JobName <String[]>
   [-RemoveResultSetDestination]
   [-TargetId <Guid>]
   [<CommonParameters>]
Set-AzureSqlJob
   [[-AzureSqlJobConnection] <AzureSqlJobConnection>]
   [-ContentName <String>]
   [-CredentialName <String>]
   [-ExecutionPolicyName <String>]
   -JobName <String[]>
   [-ResultSetDestinationCredentialName <String>]
   [-ResultSetDestinationDatabaseName <String>]
   [-ResultSetDestinationSchemaName <String>]
   [-ResultSetDestinationServerName <String>]
   [-ResultSetDestinationTableName <String>]
   [-TargetId <Guid>]
   [-LiteralServerName]
   [<CommonParameters>]

Description

The Set-AzureSqlJob cmdlet updates a job definition.

Examples

Example 1: Add a result set collection to a specified job

PS C:\>Set-AzureSqlDatabaseJob -JobName "MyResultsJob" -ResultSetDestinationServerName "MyResultsServerName.database.contoso.net" -ResultSetDestinationDatabaseName "MyResultsDatabaseName" -ResultSetDestinationCredentialName "MyResultsCredential" -ResultSetDestinationSchemaName "DBO" -ResultSetDestinationTableName "MyResultsTable"
JobName              : MyResultsJob
ContentName          : MyScript
ContentVersionNumber :
TargetDescription    : {"CustomCollectionName":"MyCustomCollection"}
TargetId             : b525727e-6ed0-44cc-94da-63c543e383d7
CredentialName       : MyCredential
ExecutionPolicyName  : Default execution policy
ResultSetDestination : Microsoft.Azure.SqlDatabase.Jobs.Client.ResultSetDestination

This command adds a result set collection to the job named MyResultsJob.

Example 2: Remove a result set collection from a specified job

PS C:\>Set-AzureSqlDatabaseJob -JobName "MyResultsJob" -RemoveResultSetDestination
JobName              : MyResultsJob
ContentName          : MyScript
ContentVersionNumber :
TargetDescription    : {"CustomCollectionName":"myCustomCollection"}
TargetId             : b525727e-6ed0-44cc-94da-63c543e383d7
CredentialName       : MyCredential
ExecutionPolicyName  : Default execution policy
ResultSetDestination :

This command removes a result set collection from the provided job.

Required Parameters

-JobName

Specifies the name of the job.

Type:String[]
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
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
-ContentName

Indicates that this cmdlet updates the content that is run or applied during the job.

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

Specifies the credentials to use when connecting to target databases.

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

Indicates that this cmdlet updates the execution policy to be used during job runs.

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

{{Fill LiteralServerName Description}}

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-RemoveResultSetDestination

Indicates that this cmdlet removes the use of a result set destination from a job.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ResultSetDestinationCredentialName

Specifies the name of the credential to use for the database connection used for insertion of the first result set obtained during job execution.

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

Specifies the database name to use for insertion of the first result set obtained during jobs.

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

Specifies the database schema name to use for insertion of the first result set obtained during job runs.

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

Specifies the database server name to use for insertion of the first result set obtained during job runs.

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

Specifies the database table name to use for insertion of the first result set obtained during a job run. If the table does not exist during job execution, the system will automatically create it using a schema matching the result set.

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

Specifies the target ID.

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