Get-AzSqlInstanceLink
Restituisce informazioni sulla funzionalità di collegamento per Istanza gestita di SQL di Azure.
Sintassi
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>]
Descrizione
Il cmdlet Get-AzSqlInstanceLink restituisce informazioni su una o più istanze di Istanza gestita di SQL di Azure collegamenti. Specificare il nome di un collegamento per visualizzare le informazioni solo per tale collegamento.
Esempio
Esempio 1: Ottenere informazioni su un collegamento attivo in Istanza gestita di SQL di 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 :
Questo comando ottiene informazioni sul collegamento all'istanza denominato "Link01" nell'istanza "Instance01" e nel gruppo di risorse "ResourceGroup01".
Esempio 2: Ottenere informazioni su tutti i collegamenti attivi in Istanza gestita di SQL di 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 :
Questo comando ottiene informazioni su tutti i collegamenti di istanza attiva nell'istanza "ManagedInstance01" e nel gruppo di risorse "ResourceGroup01".
Esempio 3: Ottenere tutti i collegamenti all'istanza in Istanza gestita di SQL di Azure usando l'oggetto 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 :
Questo comando ottiene informazioni su tutti i collegamenti di istanza attiva nell'istanza "ManagedInstance01".
Esempio 4: Ottenere tutti i collegamenti all'istanza in Istanza gestita di SQL di Azure usando l'identificatore di risorsa
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 :
Questo comando ottiene informazioni su tutti i collegamenti di istanza per l'istanza "ManagedInstance01".
Esempio 5: Ottenere un collegamento all'istanza usando il relativo identificatore di risorsa
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 :
Questo comando ottiene informazioni sul collegamento all'istanza denominato "Link01".
Esempio 6: Ottenere tutti i collegamenti di istanza per un Istanza gestita tramite pipe di un oggetto istanza
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 :
Questo comando ottiene informazioni su tutti i collegamenti all'istanza all'interno dell'istanza "ManagedInstance01".
Esempio 7: Ottenere un collegamento di istanza specifico per un'istanza tramite pipe di un oggetto istanza e specificando il nome del collegamento
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 :
Questo comando ottiene informazioni sul collegamento all'istanza denominato "Link01: all'interno dell'istanza "Instance01".
Esempio 8: Ottenere informazioni sul collegamento all'istanza usando i parametri posizionali
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 :
Questo comando ottiene informazioni sul collegamento all'istanza denominato "Link01" nell'istanza "Instance01" e nel gruppo di risorse "ResourceGroup01".
Parametri
-DefaultProfile
Le credenziali, l’account, il tenant e la sottoscrizione usati per comunicare con Azure.
Tipo: | IAzureContextContainer |
Alias: | AzContext, AzureRmContext, AzureCredential |
Posizione: | Named |
Valore predefinito: | None |
Necessario: | False |
Accettare l'input della pipeline: | False |
Accettare caratteri jolly: | False |
-InstanceName
Nome del Istanza gestita di SQL di Azure.
Tipo: | String |
Posizione: | 1 |
Valore predefinito: | None |
Necessario: | True |
Accettare l'input della pipeline: | False |
Accettare caratteri jolly: | False |
-InstanceObject
Oggetto di input dell'istanza.
Tipo: | AzureSqlManagedInstanceModel |
Posizione: | 0 |
Valore predefinito: | None |
Necessario: | True |
Accettare l'input della pipeline: | True |
Accettare caratteri jolly: | False |
-InstanceResourceId
ID risorsa dell'istanza gestita.
Tipo: | String |
Posizione: | 0 |
Valore predefinito: | None |
Necessario: | True |
Accettare l'input della pipeline: | True |
Accettare caratteri jolly: | False |
-Name
Nome del collegamento all'istanza.
Tipo: | String |
Alias: | LinkName |
Posizione: | 2 |
Valore predefinito: | None |
Necessario: | False |
Accettare l'input della pipeline: | False |
Accettare caratteri jolly: | False |
-ResourceGroupName
Nome del gruppo di risorse.
Tipo: | String |
Posizione: | 0 |
Valore predefinito: | None |
Necessario: | True |
Accettare l'input della pipeline: | False |
Accettare caratteri jolly: | False |
-ResourceId
ID risorsa collegamento istanza.
Tipo: | String |
Posizione: | 0 |
Valore predefinito: | None |
Necessario: | True |
Accettare l'input della pipeline: | True |
Accettare caratteri jolly: | False |
Input
Output
AzureSqlManagedInstanceLinkModel