Get-AzSqlInstanceLink
Retorna informações sobre o recurso de link para a Instância Gerenciada de SQL do Azure.
Sintaxe
Get-AzSqlInstanceLink
[-ResourceGroupName] <String>
[-InstanceName] <String>
[[-Name] <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzSqlInstanceLink
[[-Name] <String>]
[-InstanceObject] <AzureSqlManagedInstanceModel>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzSqlInstanceLink
[[-Name] <String>]
[-InstanceResourceId] <String>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzSqlInstanceLink
[-ResourceId] <String>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
O cmdlet Get-AzSqlInstanceLink retorna informações sobre uma ou mais instâncias de links de Instância Gerenciada de SQL do Azure. Especifique o nome de um link para ver informações somente para esse link.
Exemplos
Exemplo 1: Obter informações sobre um link ativo na Instância Gerenciada de SQL do Azure
Get-AzSqlInstanceLink -ResourceGroupName "ResourceGroup01" -InstanceName "ManagedInstance01" -Name "Link01"
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
TargetDatabase : Database01
SourceEndpoint : TCP://SERVER01:5022
PrimaryAvailabilityGroupName :
SecondaryAvailabilityGroupName :
ReplicationMode : Async
DistributedAvailabilityGroupId : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
SourceReplicaId : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
TargetReplicaId : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
LinkState : Copying
LastHardenedLsn :
Esse comando obtém informações sobre o link de instância chamado "Link01" na instância "Instance01" e no grupo de recursos "ResourceGroup01".
Exemplo 2: Obter informações sobre todos os links ativos na Instância Gerenciada de SQL do Azure
Get-AzSqlInstanceLink -ResourceGroupName "ResourceGroup01" -InstanceName "ManagedInstance01"
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
TargetDatabase : Database01
SourceEndpoint : TCP://SERVER01:5022
PrimaryAvailabilityGroupName :
SecondaryAvailabilityGroupName :
ReplicationMode : Async
DistributedAvailabilityGroupId : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
SourceReplicaId : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
TargetReplicaId : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
LinkState : Copying
LastHardenedLsn :
ResourceGroupName : ResourceGroup01
InstanceName : ManagedInstance01
Type : Microsoft.Sql/managedInstances/distributedAvailabilityGroups
Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/ResourceGroup01/providers/Microsoft.Sql/managedInstances/ManagedInstance01/distributedAvailabilityGroups/Link02
Name : Link02
TargetDatabase : Database02
SourceEndpoint : TCP://SERVER02:5022
PrimaryAvailabilityGroupName :
SecondaryAvailabilityGroupName :
ReplicationMode : Async
DistributedAvailabilityGroupId : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
SourceReplicaId : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
TargetReplicaId : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
LinkState : Copying
LastHardenedLsn :
Esse comando obtém informações sobre todos os links de instância ativos na instância "ManagedInstance01" e no grupo de recursos "ResourceGroup01".
Exemplo 3: Obter todos os links de instância na Instância Gerenciada de SQL do Azure usando o objeto Instance
$instance = Get-AzSqlInstance -Name "ManagedInstance01" -ResourceGroupName "ResourceGroup01"
Get-AzSqlInstanceLink -InstanceObject $instance
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
TargetDatabase : Database01
SourceEndpoint : TCP://SERVER01:5022
PrimaryAvailabilityGroupName :
SecondaryAvailabilityGroupName :
ReplicationMode : Async
DistributedAvailabilityGroupId : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
SourceReplicaId : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
TargetReplicaId : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
LinkState : Copying
LastHardenedLsn :
ResourceGroupName : ResourceGroup01
InstanceName : ManagedInstance01
Type : Microsoft.Sql/managedInstances/distributedAvailabilityGroups
Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/ResourceGroup01/providers/Microsoft.Sql/managedInstances/ManagedInstance01/distributedAvailabilityGroups/Link02
Name : Link02
TargetDatabase : Database02
SourceEndpoint : TCP://SERVER02:5022
PrimaryAvailabilityGroupName :
SecondaryAvailabilityGroupName :
ReplicationMode : Async
DistributedAvailabilityGroupId : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
SourceReplicaId : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
TargetReplicaId : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
LinkState : Copying
LastHardenedLsn :
Esse comando obtém informações sobre todos os links de instância ativos na instância "ManagedInstance01".
Exemplo 4: Obter todos os links de instância na Instância Gerenciada de SQL do Azure usando o identificador de recurso
Get-AzSqlInstanceLink -InstanceResourceId "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/ResourceGroup01/providers/Microsoft.Sql/managedInstances/ManagedInstance01"
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
TargetDatabase : Database01
SourceEndpoint : TCP://SERVER01:5022
PrimaryAvailabilityGroupName :
SecondaryAvailabilityGroupName :
ReplicationMode : Async
DistributedAvailabilityGroupId : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
SourceReplicaId : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
TargetReplicaId : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
LinkState : Copying
LastHardenedLsn :
ResourceGroupName : ResourceGroup01
InstanceName : ManagedInstance01
Type : Microsoft.Sql/managedInstances/distributedAvailabilityGroups
Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/ResourceGroup01/providers/Microsoft.Sql/managedInstances/ManagedInstance01/distributedAvailabilityGroups/Link02
Name : Link02
TargetDatabase : Database02
SourceEndpoint : TCP://SERVER02:5022
PrimaryAvailabilityGroupName :
SecondaryAvailabilityGroupName :
ReplicationMode : Async
DistributedAvailabilityGroupId : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
SourceReplicaId : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
TargetReplicaId : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
LinkState : Copying
LastHardenedLsn :
Esse comando obtém informações sobre todos os links de instância para a instância "ManagedInstance01".
Exemplo 5: Obter um link de instância usando seu identificador de recurso
Get-AzSqlInstanceLink -ResourceId "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourcegroup01/providers/Microsoft.Sql/managedInstances/ManagedInstance01/distributedAvailabilityGroups/Link01"
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
TargetDatabase : Database01
SourceEndpoint : TCP://SERVER01:5022
PrimaryAvailabilityGroupName :
SecondaryAvailabilityGroupName :
ReplicationMode : Async
DistributedAvailabilityGroupId : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
SourceReplicaId : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
TargetReplicaId : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
LinkState : Copying
LastHardenedLsn :
Esse comando obtém informações sobre o link da instância chamado "Link01".
Exemplo 6: Obter todos os links de instância para uma Instância Gerenciada canalizando um objeto de instância
Get-AzSqlInstance -Name "ManagedInstance01" -ResourceGroupName "ResourceGroup01" | Get-AzSqlInstanceLink
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
TargetDatabase : Database01
SourceEndpoint : TCP://SERVER01:5022
PrimaryAvailabilityGroupName :
SecondaryAvailabilityGroupName :
ReplicationMode : Async
DistributedAvailabilityGroupId : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
SourceReplicaId : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
TargetReplicaId : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
LinkState : Copying
LastHardenedLsn :
ResourceGroupName : ResourceGroup01
InstanceName : ManagedInstance01
Type : Microsoft.Sql/managedInstances/distributedAvailabilityGroups
Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/ResourceGroup01/providers/Microsoft.Sql/managedInstances/ManagedInstance01/distributedAvailabilityGroups/Link02
Name : Link02
TargetDatabase : Database02
SourceEndpoint : TCP://SERVER02:5022
PrimaryAvailabilityGroupName :
SecondaryAvailabilityGroupName :
ReplicationMode : Async
DistributedAvailabilityGroupId : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
SourceReplicaId : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
TargetReplicaId : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
LinkState : Copying
LastHardenedLsn :
Esse comando obtém informações sobre todos os links de instância dentro da instância "ManagedInstance01".
Exemplo 7: Obter um link de instância específico para uma instância canalizando um objeto de instância e especificando o nome do link
Get-AzSqlInstance -Name "ManagedInstance01" -ResourceGroupName "ResourceGroup01" | Get-AzSqlInstanceLink -Name "Link01"
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
TargetDatabase : Database01
SourceEndpoint : TCP://SERVER01:5022
PrimaryAvailabilityGroupName :
SecondaryAvailabilityGroupName :
ReplicationMode : Async
DistributedAvailabilityGroupId : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
SourceReplicaId : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
TargetReplicaId : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
LinkState : Copying
LastHardenedLsn :
Esse comando obtém informações sobre o link da instância chamado "Link01: dentro da instância "Instance01".
Exemplo 8: Obter informações sobre o link de instância usando parâmetros posicionais
Get-AzSqlInstanceLink "ResourceGroup01" "ManagedInstance01" "Link01"
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
TargetDatabase : Database01
SourceEndpoint : TCP://SERVER01:5022
PrimaryAvailabilityGroupName :
SecondaryAvailabilityGroupName :
ReplicationMode : Async
DistributedAvailabilityGroupId : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
SourceReplicaId : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
TargetReplicaId : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
LinkState : Copying
LastHardenedLsn :
Esse comando obtém informações sobre o link de instância chamado "Link01" na instância "Instance01" e no grupo de recursos "ResourceGroup01".
Parâmetros
-DefaultProfile
As credenciais, a conta, o locatário e a assinatura usados para a comunicação com o Azure.
Tipo: | IAzureContextContainer |
Aliases: | AzContext, AzureRmContext, AzureCredential |
Cargo: | Named |
Valor padrão: | None |
Obrigatório: | False |
Aceitar a entrada de pipeline: | False |
Aceitar caracteres curinga: | False |
-InstanceName
Nome da Instância Gerenciada de SQL do Azure.
Tipo: | String |
Cargo: | 1 |
Valor padrão: | None |
Obrigatório: | True |
Aceitar a entrada de pipeline: | False |
Aceitar caracteres curinga: | False |
-InstanceObject
Objeto de entrada de instância.
Tipo: | AzureSqlManagedInstanceModel |
Cargo: | 0 |
Valor padrão: | None |
Obrigatório: | True |
Aceitar a entrada de pipeline: | True |
Aceitar caracteres curinga: | False |
-InstanceResourceId
ID do recurso de instância gerenciada.
Tipo: | String |
Cargo: | 0 |
Valor padrão: | None |
Obrigatório: | True |
Aceitar a entrada de pipeline: | True |
Aceitar caracteres curinga: | False |
-Name
Nome do link da instância.
Tipo: | String |
Aliases: | LinkName |
Cargo: | 2 |
Valor padrão: | None |
Obrigatório: | False |
Aceitar a entrada de pipeline: | False |
Aceitar caracteres curinga: | False |
-ResourceGroupName
Nome do grupo de recursos.
Tipo: | String |
Cargo: | 0 |
Valor padrão: | None |
Obrigatório: | True |
Aceitar a entrada de pipeline: | False |
Aceitar caracteres curinga: | False |
-ResourceId
A ID do recurso de link de instância.
Tipo: | String |
Cargo: | 0 |
Valor padrão: | None |
Obrigatório: | True |
Aceitar a entrada de pipeline: | True |
Aceitar caracteres curinga: | False |
Entradas
Saídas
AzureSqlManagedInstanceLinkModel