Start-AzSqlInstanceLinkFailover
Failovers an instance link.
Syntax
Start-AzSqlInstanceLinkFailover
[-ResourceGroupName] <String>
[-InstanceName] <String>
[-Name] <String>
-FailoverType <String>
[-Force]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Start-AzSqlInstanceLinkFailover
[-Name] <String>
-FailoverType <String>
[-InstanceObject] <AzureSqlManagedInstanceModel>
[-Force]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Start-AzSqlInstanceLinkFailover
[-Name] <String>
-FailoverType <String>
[-InputObject] <AzureSqlManagedInstanceLinkModel>
[-Force]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Start-AzSqlInstanceLinkFailover
-FailoverType <String>
[-ResourceId] <String>
[-Force]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
Start-AzSqlInstanceLinkFailover cmdlet failovers an instance link.
Examples
Example 1
Start-AzSqlInstanceLinkFailover -ResourceGroupName "ResourceGroup01" -InstanceName "ManagedInstance01" -Name "Link01" -FailoverType "ForcedAllowDataLoss"
ResourceGroupName : ResourceGroup01
InstanceName : ManagedInstance01
Type : Microsoft.Sql/managedInstances/distributedAvailabilityGroups
Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/ResourceGroup01/providers/Microsoft.Sql/managedInstances/ManagedInstance01/distributedAvailabilityGroups/Link01
Name : Link01
DistributedAvailabilityGroupName : Link01
DistributedAvailabilityGroupId : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
Databases : {Database01}
InstanceAvailabilityGroupName : AG_Database01_MI
PartnerAvailabilityGroupName : AG_Database01
PartnerEndpoint : TCP://SERVER01:5022
InstanceLinkRole : Primary
PartnerLinkRole : Secondary
ReplicationMode : Async
FailoverMode : Manual
SeedingMode : Automatic
This command does forced failover of the instance link with name "Link01".
Example 2
$instance = Get-AzSqlInstance -ResourceGroupName "ResourceGroup01" -Name "ManagedInstance01"
$instance | Start-AzSqlInstanceLinkFailover -Name "Link01" -FailoverType "Planned"
ResourceGroupName : ResourceGroup01
InstanceName : ManagedInstance01
Type : Microsoft.Sql/managedInstances/distributedAvailabilityGroups
Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/ResourceGroup01/providers/Microsoft.Sql/managedInstances/ManagedInstance01/distributedAvailabilityGroups/Link01
Name : Link01
DistributedAvailabilityGroupName : Link01
DistributedAvailabilityGroupId : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
Databases : {Database01}
InstanceAvailabilityGroupName : AG_Database01_MI
PartnerAvailabilityGroupName : AG_Database01
PartnerEndpoint : TCP://SERVER01:5022
InstanceLinkRole : Primary
PartnerLinkRole : Secondary
ReplicationMode : Async
FailoverMode : Manual
SeedingMode : Automatic
This command does planned failover of the instance link by piping an instance object.
Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: | SwitchParameter |
Aliases: | cf |
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 |
-FailoverType
The failover type, can be ForcedAllowDataLoss or Planned.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Force
Skip confirmation message for performing the action
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-InputObject
Instance link input object.
Type: | AzureSqlManagedInstanceLinkModel |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-InstanceName
Name of the managed instance.
Type: | String |
Position: | 1 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-InstanceObject
Instance input object.
Type: | AzureSqlManagedInstanceModel |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Name
Managed Instance link name.
Type: | String |
Aliases: | LinkName |
Position: | 2 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ResourceGroupName
Name of the resource group.
Type: | String |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ResourceId
The instance link resource ID.
Type: | String |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
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: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Inputs
AzureSqlManagedInstanceLinkModel
Outputs
AzureSqlManagedInstanceLinkModel