Get-AzSqlDatabaseInstanceFailoverGroup
Gets or lists Instance Failover Groups.
Syntax
Default (Default)
Get-AzSqlDatabaseInstanceFailoverGroup
[[-Name] <String>]
[-ResourceGroupName] <String>
[-Location] <String>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
Gets a specific Instance Failover Group or lists the Instance Failover Groups in a region under the user's subscription.
Either region in the Instance Failover Group may be used to execute the command. The returned values will reflect the state of the Managed Instances in that region with respect to the Instance Failover Group.
Examples
Example 1
$failoverGroups = Get-AzSqlDatabaseInstanceFailoverGroup -ResourceGroupName rg -Location location
{
ResourceGroupName : rg
Location : East US
Name : fg
PartnerResourceGroupName : rg
PartnerRegion : West US
PrimaryManagedInstanceName : managedInstance1
PartnerManagedInstanceName : managedInstance2
ReplicationRole : Primary
ReplicationState : CATCH_UP
ReadWriteFailoverPolicy : Automatic
FailoverWithDataLossGracePeriodHours : 1
ReadOnlyFailoverPolicy : Disabled
Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/rg/providers/Microsoft.Sql/locations/eastus/instanceFailoverGroups/fg
}
Lists all Failover Groups in the region
Example 2
$failoverGroup = Get-AzSqlDatabaseInstanceFailoverGroup -ResourceGroupName rg -Location location -Name fg
ResourceGroupName : rg
Location : East US
Name : fg
PartnerResourceGroupName : rg
PartnerRegion : West US
PrimaryManagedInstanceName : managedInstance1
PartnerManagedInstanceName : managedInstance2
ReplicationRole : Primary
ReplicationState : CATCH_UP
ReadWriteFailoverPolicy : Automatic
FailoverWithDataLossGracePeriodHours : 1
ReadOnlyFailoverPolicy : Disabled
Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/rg/providers/Microsoft.Sql/locations/eastus/instanceFailoverGroups/fg
Get a specific Instance Failover Group.
Parameters
-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 |
-Location
The name of the Local Region from which to retrieve the Instance Failover Group.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | 1 |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-Name
The name of the Instance Failover Group to retrieve.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | 2 |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-ResourceGroupName
The name of the resource group.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | 0 |
Mandatory: | True |
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.