Editar

Compartir a través de


Get-AzSqlDatabaseFailoverGroup

Gets or lists Azure SQL Database Failover Groups.

Syntax

Get-AzSqlDatabaseFailoverGroup
   [-ServerName] <String>
   [[-FailoverGroupName] <String>]
   [-ResourceGroupName] <String>
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]

Description

Gets a specific Azure SQL Database Failover Group or lists the Failover Groups on a server. Either server in the Failover Group may be used to execute the command. The returned values will reflect the state of the specified server with respect to the Failover Group.

Examples

Example 1

$failoverGroups = Get-AzSqlDatabaseFailoverGroup -ResourceGroupName rg -ServerName server

Lists all Failover Groups on a server.

Example 2

$failoverGroup = Get-AzSqlDatabaseFailoverGroup -ResourceGroupName rg -ServerName server -FailoverGroupName fg

Get a specific Failover Group.

Example 3

$failoverGroup = Get-AzSqlDatabaseFailoverGroup -ResourceGroupName rg -ServerName server -FailoverGroupName fg*

Get all failover groups in a server that start with "fg".

Parameters

-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

-FailoverGroupName

The name of the Azure SQL Database Failover Group to retrieve.

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

-ResourceGroupName

The name of the resource group.

Type:String
Position:0
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-ServerName

The name of the Azure SQL Database Server from which to retrieve the Failover Group.

Type:String
Position:1
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

Inputs

String

Outputs

AzureSqlFailoverGroupModel