Remove-AzSqlInstanceLink

Hiermee verwijdert u een exemplaarkoppeling.

Syntax

Remove-AzSqlInstanceLink
      [-ResourceGroupName] <String>
      [-InstanceName] <String>
      [-Name] <String>
      [-Force]
      [-PassThru]
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Remove-AzSqlInstanceLink
      [-Name] <String>
      [-InstanceObject] <AzureSqlManagedInstanceModel>
      [-Force]
      [-PassThru]
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Remove-AzSqlInstanceLink
      [-InputObject] <AzureSqlManagedInstanceLinkModel>
      [-Force]
      [-PassThru]
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Remove-AzSqlInstanceLink
      [-ResourceId] <String>
      [-Force]
      [-PassThru]
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]

Description

De cmdlet Remove-AzSqlInstanceLink verwijdert een exemplaarkoppeling. Deze opdracht kan gegevensverlies veroorzaken als de koppeling wordt verwijderd en de LSN's van de replica niet worden gesynchroniseerd met de primaire, dus de gebruiker moet de opdracht expliciet bevestigen wanneer daarom wordt gevraagd, of de parameter -Force gebruiken.

Voorbeelden

Voorbeeld 1: Koppeling exemplaar verwijderen

Remove-AzSqlInstanceLink -ResourceGroupName "ResourceGroup01" -InstanceName "ManagedInstance01" -Name "Link01"

This operation may cause data loss if replica's last hardened LSN is not in sync with the primary. Are you sure you want to proceed?
[Y] Yes  [N] No  [?] Help (default is "Y"): Y

Met deze opdracht verwijdert u de exemplaarkoppeling Link01 uit het beheerde exemplaar ManagedInstance01.

Voorbeeld 2: Een exemplaarkoppeling verwijderen met een expliciete vlag -Force

Remove-AzSqlInstanceLink -ResourceGroupName "ResourceGroup01" -InstanceName "ManagedInstance01" -Name "Link01" -Force

Met deze opdracht wordt de exemplaarkoppeling 'Link01' geforceerd verwijderd uit het beheerde exemplaar ManagedInstance01, waarbij de waarschuwing voor gegevensverlies wordt genegeerd.

Voorbeeld 3: Instantiekoppeling verwijderen op resource-id

Remove-AzSqlInstanceLink -ResourceId "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourcegroup01/providers/Microsoft.Sql/managedInstances/ManagedInstance01/distributedAvailabilityGroups/Link01"

This operation may cause data loss if replica's last hardened LSN is not in sync with the primary. Are you sure you want to proceed?
[Y] Yes  [N] No  [?] Help (default is "Y"): Y

Met deze opdracht wordt de exemplaarkoppeling met de opgegeven resource-id verwijderd.

Voorbeeld 4: Exemplaarkoppeling verwijderen door het PowerShell-object

$managedInstanceLink = Get-AzSqlInstanceLink -ResourceGroupName "ResourceGroup01" -InstanceName "ManagedInstance01" -Name "Link01" 
Remove-AzSqlInstanceLink -InputObject $managedInstanceLink

This operation may cause data loss if replica's last hardened LSN is not in sync with the primary. Are you sure you want to proceed?
[Y] Yes  [N] No  [?] Help (default is "Y"): Y

Met deze opdracht verwijdert u de exemplaarkoppeling die is opgegeven door het exemplaarkoppelingsobject.

Voorbeeld 5: Exemplaarkoppeling verwijderen door het bovenliggende exemplaarobject

$instance = Get-AzSqlInstance -ResourceGroupName "ResourceGroup01" -Name "ManagedInstance01" 
Remove-AzSqlInstanceLink -InstanceObject $instance -Name "Link01"

This operation may cause data loss if replica's last hardened LSN is not in sync with the primary. Are you sure you want to proceed?
[Y] Yes  [N] No  [?] Help (default is "Y"): Y

Met deze opdracht verwijdert u de exemplaarkoppeling Link01 uit het beheerde exemplaar dat is opgegeven door het exemplaarobject.

Voorbeeld 6: Exemplaarkoppeling verwijderen met behulp van positionele parameters

Remove-AzSqlInstanceLink "ResourceGroup01" "ManagedInstance01" "Link01"

This operation may cause data loss if replica's last hardened LSN is not in sync with the primary. Are you sure you want to proceed?
[Y] Yes  [N] No  [?] Help (default is "Y"): Y

Met deze opdracht verwijdert u de exemplaarkoppeling Link01 uit het beheerde exemplaar ManagedInstance01 met behulp van positionele parameters.

Voorbeeld 7: Verwijder alle exemplaarkoppelingen uit het bovenliggende exemplaar door koppelingsobjecten door te leiden

$instance = Get-AzSqlInstance -ResourceGroupName "ResourceGroup01" -Name "ManagedInstance01" 
$instance | Get-AzSqlInstanceLink | Remove-AzSqlInstanceLink -Force

Met deze opdracht verwijdert u alle exemplaarkoppelingen uit het beheerde exemplaar ManagedInstance01.

Voorbeeld 8: Instantiekoppeling verwijderen met een expliciete vlag -Forceren en het verwijderde exemplaarkoppelingsobject uitvoeren

Remove-AzSqlInstanceLink -ResourceGroupName "ResourceGroup01" -InstanceName "ManagedInstance01" -Name "Link01" -Force -PassThru

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                :

Met deze opdracht wordt een exemplaarkoppeling verwijderd uit het beheerde exemplaar ManagedInstance01 en wordt het verwijderde exemplaarkoppelingsobject uitgevoerd.

Parameters

-Confirm

Hiermee wordt u gevraagd om bevestiging voordat u de cmdlet uitvoert.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DefaultProfile

De referenties, accounts, tenants en abonnementen die worden gebruikt voor communicatie met Azure.

Type:IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Force

Bevestigingsbericht overslaan voor het uitvoeren van de actie.

Type:SwitchParameter
Aliases:AllowDataLoss
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-InputObject

Invoerobject exemplaarkoppeling.

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

-InstanceName

Naam van Azure SQL Managed Instance.

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

-InstanceObject

Exemplaarinvoerobject.

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

-Name

Naam van de exemplaarkoppeling.

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

-PassThru

Hiermee definieert u of de koppeling van het verwijderde exemplaar moet worden geretourneerd.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ResourceGroupName

De naam van de resourcegroep.

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

-ResourceId

De resource-id van het exemplaar koppelen.

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

-WhatIf

Hiermee wordt weergegeven wat er zou gebeuren als u de cmdlet uitvoert. De cmdlet wordt niet uitgevoerd.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Invoerwaarden

AzureSqlManagedInstanceModel

AzureSqlManagedInstanceLinkModel

String

Uitvoerwaarden

AzureSqlManagedInstanceLinkModel