Düzenle

Aracılığıyla paylaş


Invoke-AzSqlInstanceFailover

Failovers an Azure SQL Managed Instance.

Syntax

Invoke-AzSqlInstanceFailover
      [-Name] <String>
      [-AsJob]
      [-PassThru]
      [-Force]
      [-ReadableSecondary]
      [-ResourceGroupName] <String>
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]

Description

The Invoke-AzSqlInstanceFailover cmdlet failovers an Azure SQL Managed Instance.

Examples

Example 1

Invoke-AzSqlInstanceFailover -ResourceGroupName "ResourceGroup01" -Name "ManagedInstance01"

This command will failover the primary replica of the instance named "ManagedInstance01".

Example 2

Invoke-AzSqlInstanceFailover -ResourceGroupName "ResourceGroup01" -Name "ManagedInstance01" -ReadableSecondary

This command will failover the readable secondary replica of the managed instance "ManagedInstance01".

Parameters

-AsJob

Run cmdlet in the background

Type:SwitchParameter
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: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

-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

-Name

The name of the Azure SQL instance to fail over.

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

-PassThru

On Successful execution, returns true. By default, this cmdlet does not generate any output.

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

-ReadableSecondary

Failover the readable secondary replica instead of the default primary replica

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

-ResourceGroupName

The name of the resource group.

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

String