次の方法で共有


Set-AzSqlDatabaseFailoverGroup

Modifies the configuration of an Azure SQL Database Failover Group.

構文

Default (既定)

Set-AzSqlDatabaseFailoverGroup
    [-ServerName] <String>
    [-FailoverGroupName] <String>
    [-FailoverPolicy <FailoverPolicy>]
    [-GracePeriodWithDataLossHours <Int32>]
    [-AllowReadOnlyFailoverToPrimary <AllowReadOnlyFailoverToPrimary>]
    [-PartnerServerList <System.Collections.Generic.List`1[System.String]>]
    [-ReadOnlyEndpointTargetServer <String>]
    [-ResourceGroupName] <String>
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]

説明

This command modifies the configuration of an Azure SQL Database Failover Group. The Failover Group's primary server should be used to execute the command. To control the set of databases in the group, use 'Add-AzSqlDatabaseToFailoverGroup' and 'Remove-AzSqlDatabaseFromFailoverGroup' instead. During preview of the Failover Groups feature, only values greater than or equal to 1 hour are supported for the '-GracePeriodWithDataLossHours' parameter.

Example 1

$failoverGroup = Set-AzSqlDatabaseFailoverGroup -ResourceGroupName rg -ServerName primaryserver -FailoverGroupName fg -FailoverPolicy Automatic -GracePeriodWithDataLossHours 1

Sets a Failover Group's failover policy to 'Automatic.'

Example 2

$failoverGroup = Get-AzSqlDatabaseFailoverGroup -ResourceGroupName rg -ServerName primaryserver -FailoverGroupName fg | Set-AzSqlDatabaseFailoverGroup -FailoverPolicy Manual

Sets a Failover Group's failover policy to 'Manual' by piping in the Failover Group.

パラメーター

-AllowReadOnlyFailoverToPrimary

Whether outages on the secondary server should trigger automatic failover of the read-only endpoint.

パラメーターのプロパティ

型:AllowReadOnlyFailoverToPrimary
規定値:None
指定可能な値:Enabled, Disabled
ワイルドカードのサポート:False
DontShow:False

パラメーター セット

(All)
配置:Named
必須:False
パイプラインからの値:False
プロパティ名別のパイプラインからの値:False
残りの引数からの値:False

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with azure

パラメーターのプロパティ

型:IAzureContextContainer
規定値:None
ワイルドカードのサポート:False
DontShow:False
Aliases:AzContext, AzureRmContext, AzureCredential

パラメーター セット

(All)
配置:Named
必須:False
パイプラインからの値:False
プロパティ名別のパイプラインからの値:False
残りの引数からの値:False

-FailoverGroupName

The name of the Azure SQL Database Failover Group.

パラメーターのプロパティ

型:String
規定値:None
ワイルドカードのサポート:False
DontShow:False

パラメーター セット

(All)
配置:2
必須:True
パイプラインからの値:False
プロパティ名別のパイプラインからの値:True
残りの引数からの値:False

-FailoverPolicy

The failover policy of the Azure SQL Database Failover Group.

パラメーターのプロパティ

型:FailoverPolicy
規定値:Manual
指定可能な値:Automatic, Manual
ワイルドカードのサポート:False
DontShow:False

パラメーター セット

(All)
配置:Named
必須:False
パイプラインからの値:False
プロパティ名別のパイプラインからの値:False
残りの引数からの値:False

-GracePeriodWithDataLossHours

Interval before automatic failover is initiated if an outage occurs on the primary server. This indicates that Azure SQL Database will not initiate automatic failover before the grace period expires. Please note that failover operation with AllowDataLoss option might cause data loss due to the nature of asynchronous synchronization.

パラメーターのプロパティ

型:Int32
規定値:1
ワイルドカードのサポート:False
DontShow:False

パラメーター セット

(All)
配置:Named
必須:False
パイプラインからの値:False
プロパティ名別のパイプラインからの値:False
残りの引数からの値:False

-PartnerServerList

The list of partner servers in the failover group (empty list for 0 servers).

パラメーターのプロパティ

型:

List<T>[String]

規定値:None
ワイルドカードのサポート:False
DontShow:False

パラメーター セット

(All)
配置:Named
必須:False
パイプラインからの値:False
プロパティ名別のパイプラインからの値:False
残りの引数からの値:False

-ReadOnlyEndpointTargetServer

The name of the target server for the read only endpoint.

パラメーターのプロパティ

型:String
規定値:None
ワイルドカードのサポート:False
DontShow:False

パラメーター セット

(All)
配置:Named
必須:False
パイプラインからの値:False
プロパティ名別のパイプラインからの値:False
残りの引数からの値:False

-ResourceGroupName

The name of the resource group.

パラメーターのプロパティ

型:String
規定値:None
ワイルドカードのサポート:False
DontShow:False

パラメーター セット

(All)
配置:0
必須:True
パイプラインからの値:False
プロパティ名別のパイプラインからの値:True
残りの引数からの値:False

-ServerName

The name of the primary Azure SQL Database Server of the Failover Group.

パラメーターのプロパティ

型:String
規定値:None
ワイルドカードのサポート:False
DontShow:False

パラメーター セット

(All)
配置:1
必須:True
パイプラインからの値:False
プロパティ名別のパイプラインからの値:True
残りの引数からの値: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.

入力

String

出力

AzureSqlFailoverGroupModel