Editar

Partilhar via


Remove-AzSqlDatabaseSecondary

Terminates data replication between a SQL Database and the specified secondary database.

Syntax

Remove-AzSqlDatabaseSecondary
      [-DatabaseName] <String>
      -PartnerResourceGroupName <String>
      -PartnerServerName <String>
      [-ServerName] <String>
      [-ResourceGroupName] <String>
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]

Description

The Remove-AzSqlDatabaseSecondary cmdlet forces termination of a geo-replication link. This cmdlet replaces the Stop-AzSqlDatabaseCopy cmdlet. There is no replication synchronization before termination.

Examples

Example 1

Terminates data replication between a SQL Database and the specified secondary database. (autogenerated)

Remove-AzSqlDatabaseSecondary -DatabaseName db1 -PartnerResourceGroupName rg2 -PartnerServerName secondaryserver -ResourceGroupName myresourcegroup -ServerName s1

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

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

-DatabaseName

Specifies the name of the primary Azure SQL Database that has the replication link that this cmdlet removes.

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

-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

-PartnerResourceGroupName

Specifies the name of the partner resource group.

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

-PartnerServerName

Specifies the name of the partner SQL Server.

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

-ResourceGroupName

Specifies the name of the resource group that is associated with the replication link to remove.

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

-ServerName

Specifies the name of the SQL Server that has the replication link to remove.

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

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

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

Inputs

String

Outputs

AzureReplicationLinkModel