Get-AzSqlElasticJobTargetExecution
Gets one or more job target executions
Syntax
DefaultSet (Default)
Get-AzSqlElasticJobTargetExecution
[-ResourceGroupName] <String>
[-ServerName] <String>
[-AgentName] <String>
[-JobName] <String>
-JobExecutionId <String>
-Count <Int32>
[-StepName <String>]
[-CreateTimeMin <DateTime>]
[-CreateTimeMax <DateTime>]
[-EndTimeMin <DateTime>]
[-EndTimeMax <DateTime>]
[-Active]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
ObjectSet
Get-AzSqlElasticJobTargetExecution
[-ParentObject] <AzureSqlElasticJobExecutionModel>
-Count <Int32>
[-StepName <String>]
[-CreateTimeMin <DateTime>]
[-CreateTimeMax <DateTime>]
[-EndTimeMin <DateTime>]
[-EndTimeMax <DateTime>]
[-Active]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
ResourceIdSet
Get-AzSqlElasticJobTargetExecution
[-ParentResourceId] <String>
-Count <Int32>
[-StepName <String>]
[-CreateTimeMin <DateTime>]
[-CreateTimeMax <DateTime>]
[-EndTimeMin <DateTime>]
[-EndTimeMax <DateTime>]
[-Active]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
The Get-AzSqlElasticJobTargetExecution cmdlet gets one or more job target executions from a job execution
Examples
Example 1: Gets one or more job target executions from a job executions
$je = Get-AzSqlElasticJobExecution -ResourceGroupName rg -ServerName elasticjobserver -AgentName agent -JobName job1 -JobExecutionId 3bcfc912-20b2-411d-a2b7-6265d13fe272
$je | Get-AzSqlElasticJobTargetExecution -Count 2
JobName JobVersion StepName StepId JobExecutionId Lifecycle TargetServerName TargetDatabaseName StartTime EndTime
------- ---------- -------- ------ -------------- --------- ---------------- ------------------ --------- -------
job1 1 step2 1 ea0a870b-dfe3-427e-9f95-d229d7815b65 Succeeded s1 db2 6/1/2018 10:11:47 PM 6/1/2018 10:11:50 PM
job1 1 step1 1 ea0a870b-dfe3-427e-9f95-d229d7815b65 Succeeded s1 db1 6/1/2018 10:11:44 PM 6/1/2018 10:11:47 PM
Example 2: Gets one or more job target executions from a job executions - filtering by step name
$je = Get-AzSqlElasticJobExecution -ResourceGroupName rg -ServerName elasticjobserver -AgentName agent -JobName job1 -JobExecutionId 3bcfc912-20b2-411d-a2b7-6265d13fe272
$je | Get-AzSqlElasticJobTargetExecution -Count 2 -StepName step2
JobName JobVersion StepName StepId JobExecutionId Lifecycle TargetServerName TargetDatabaseName StartTime EndTime
------- ---------- -------- ------ -------------- --------- ---------------- ------------------ --------- -------
job1 1 step2 1 ea0a870b-dfe3-427e-9f95-d229d7815b65 Succeeded s1 db2 6/1/2018 10:11:47 PM 6/1/2018 10:11:50 PM
Gets one or more job target executions
Parameters
-Active
Flag to filter by active executions.
Parameter properties
Type: SwitchParameter
Default value: False
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
-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
-Count
Count returns the top number of executions.
Parameter properties
Type: Nullable<T> [ Int32 ]
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-CreateTimeMax
Filter by create time max
Parameter properties
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-CreateTimeMin
Filter by create time min
Parameter properties
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
-EndTimeMax
Filter by end time max.
Parameter properties
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-EndTimeMin
Filter by end time min.
Parameter properties
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-JobExecutionId
The job execution id.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
DefaultSet
Position: Named
Mandatory: True
Value from pipeline: False
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
-ParentObject
The job execution object.
Parameter properties
Parameter sets
ObjectSet
Position: 0
Mandatory: True
Value from pipeline: True
Value from pipeline by property name: False
Value from remaining arguments: False
-ParentResourceId
The job execution 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
-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
-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
-StepName
The job step 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
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 .
Outputs