Cmdlets

Choose a cmdlet from the list on the left or search for a specific cmdlet. Choose a cmdlet from the list or search for a specific cmdlet.
About Help  Providers
 

Stop-AzureSqlDatabaseCopy

Stop-AzureSqlDatabaseCopy

microsoft.windowsazure.commands.sqldatabase.dll

Synopsis

Terminates a continuous copy relationship. There are two modes of termination: termination and forced termination (with possible data loss).

Syntax

Stop-AzureSqlDatabaseCopy [-ServerName] [-DatabaseCopy] [-ForcedTermination] [-Force] [-WhatIf] [-Confirm] [<CommonParameters>]

Stop-AzureSqlDatabaseCopy [-ServerName] [-Database] [-PartnerServer] [-PartnerDatabase] [-ForcedTermination] [-Force] [-WhatIf] [-Confirm] [<CommonParameters>]

Stop-AzureSqlDatabaseCopy [-ServerName] [-DatabaseName] [-PartnerServer] [-PartnerDatabase] [-ForcedTermination] [-Force] [-WhatIf] [-Confirm] [<CommonParameters>]

Detailed Description

Terminates a continuous copy relationship. The system terminates the data movement between the source and replica databases and changes the database state on the former replica database. There are two modes of termination: termination and forced termination (with possible data loss). A termination that is not forced waits until all committed transactions on the source database at the time of the call have been replicated to the replica database. A termination that is not forced is disallowed when the replication status is PENDING. In contrast, a forced termination does not wait for replication of any outstanding committed transactions. For this reason, a forced termination can result in data loss on the replica database. A Stop-AzureSqlDatabaseCopy command can be executed on the source or replica database. On the server that hosts the replica database (the "target server") only the forced termination mode is supported.

Parameters

-ServerName <String>

The name of the server on which the source database resides.

Aliases

None

Required?

true

Position

0

Default value

None

Accept pipeline input?

true (ByValue, ByPropertyName)

Accept wildcard characters?

false

-DatabaseCopy <DatabaseCopy>

An object representing the database whose continuous copy relationship is to be terminated. -DatabaseCopy can accept an array using the pipeline.

Aliases

None

Required?

true

Position

1

Default value

None

Accept pipeline input?

true (ByValue)

Accept wildcard characters?

false

-ForcedTermination <SwitchParameter>

Causes forced termination of the continuous copy relationship (with possible data loss). You can abbreviate this parameter name to Forced. On a target server, -ForcedTermination (or -Forced) is always required. On the source server, this parameter is required only if the target replica database is unavailable.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-Force <SwitchParameter>

Allows the action to complete without prompting you for confirmation.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-WhatIf <SwitchParameter>

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

Aliases

None

Required?

false

Position

named

Default value

false

Accept pipeline input?

false

Accept wildcard characters?

false

-Confirm <SwitchParameter>

Prompts you for confirmation before running the cmdlet.

Aliases

None

Required?

false

Position

named

Default value

false

Accept pipeline input?

false

Accept wildcard characters?

false

-Database <Database>

A single object that represents the database whose continuous copy relationship is to be terminated.

Aliases

None

Required?

true

Position

1

Default value

None

Accept pipeline input?

true (ByValue)

Accept wildcard characters?

false

-PartnerServer <String>

The name of a target server.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-PartnerDatabase <String>

Specifies name of a given replica database. If specified, this name must match the name of the source database.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-DatabaseName <String>

The name of the database whose continuous copy relationship is to be terminated.

Aliases

None

Required?

true

Position

1

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

Input Type

Microsoft.WindowsAzure.Commands.SqlDatabase.Model.DatabaseCopy

Return Type

No output

Notes

Authentication: This cmdlet requires certificate-based authentication. For an example of how to use certificate-based authentication to set the current subscription, see the Get-Help topic for the New-AzureSqlDatabaseServerContext cmdlet.

Examples

-------------------------- EXAMPLE 1 --------------------------

This example terminates the continuous copy relationship of database "Orders" on the server "lpqd0zbr8y" with the replica database on the "bk0b8kf658" target server.

PS C:\>Stop-AzureSqlDatabaseCopy -ServerName "lpqd0zbr8y" -DatabaseName "Orders" -PartnerServer "bk0b8kf658"

-------------------------- EXAMPLE 2 --------------------------

This example forcibly terminates a continuous copy relationship from the server that hosts a replica database.

PS C:\>$myDbCopy = Get-AzureSqlDatabaseCopy -ServerName "lpqd0zbr8y" -DatabaseName "Orders"
PS C:\>$myDbCopy | Stop-AzureSqlDatabaseCopy -ServerName "lpqd0zbr8y" -ForcedTermination