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
 

Start-AzureSqlDatabaseCopy

Start-AzureSqlDatabaseCopy

microsoft.windowsazure.commands.sqldatabase.dll

Synopsis

Creates a one-time copy or a continuous copy (a "replica database") of a specified Azure SQL database (the "source database"). For a one-time copy, the source and partner databases must reside on the same server. For a continuous copy, the source and replica databases must reside on different servers, which typically reside in different regions.

Syntax

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

Start-AzureSqlDatabaseCopy [-ServerName] [-Database] [-PartnerServer] [-PartnerDatabase] [-ContinuousCopy] [-OfflineSecondary] [-Force] [-WhatIf] [-Confirm] [<CommonParameters>]

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

Start-AzureSqlDatabaseCopy [-ServerName] [-DatabaseName] [-PartnerServer] [-PartnerDatabase] [-ContinuousCopy] [-OfflineSecondary] [-Force] [-WhatIf] [-Confirm] [<CommonParameters>]

Detailed Description

The Start-AzureSqlDatabaseCopy cmdlet schedules the creation of a copy of a specified source database. A continuous copy, which is known as a replica database, is a read-only copy. All transactions from the source are asynchronously replicated to the replica. The source and replica databases must reside on different servers, which typically reside in different regions. The source and replica databases will remain connected until the application invokes an explicit command to terminate the continuous copy relationship. Start-AzureSqlDatabaseCopy returns immediately without waiting for the completion of the creation process. Invoking Start-AzureSqlDatabaseCopy causes the system to perform the following steps: (1) create the partner database, (2) copy metadata to the partner database, and (3) seed the partner database to put it into the transactionally consistent state.

Parameters

-ServerName <String>

The name of the server on which the source database to be copied resides.

Aliases

None

Required?

true

Position

0

Default value

None

Accept pipeline input?

true (ByValue, ByPropertyName)

Accept wildcard characters?

false

-Database <Database>

An object representing the SQL database to be copied. -Database can accept an array that is passed via a pipe.

Aliases

None

Required?

true

Position

1

Default value

None

Accept pipeline input?

true (ByValue)

Accept wildcard characters?

false

-PartnerServer <String>

The name of the server that will host the partner database. If ContinuousCopy is not specified, then the partner server must be the same as the source server.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-PartnerDatabase <String>

Specifies name of the partner database. If ContinuousCopy is specified, this parameter is optional and, if specified, the name must match the name of the source database. If ContinuousCopy is not specified, then this parameter is not optional and it must be different from the source database name.

Aliases

None

Required?

true

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

-ContinuousCopy <SwitchParameter>

Specifies that the database copy will be a continuous-copy (a replica database). Continuous copy is not supported within the same server. If this parameter is not specified, then a one-time copy is performed. For a one-time copy, the source and partner databases must be on the same server.

Aliases

None

Required?

true

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-OfflineSecondary <SwitchParameter>

Specifies that a continuous copy is a passive copy rather than an active copy. If the source database is a Standard edition database, then this parameter is required. If this parameter is specified then ContinuousCopy must also be specified.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-DatabaseName <String>

The name of the source database to be copied.

Aliases

None

Required?

true

Position

1

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

Input Type

Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Server.Database

Return Type

Microsoft.WindowsAzure.Commands.SqlDatabase.Model.DatabaseCopy

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 schedules a continuous copy of the database, "Orders", on the server, "lpqd0zbr8y", creating the replica database on the "bk0b8kf658" server.

PS C:\>Start-AzureSqlDatabaseCopy -ServerName "lpqd0zbr8y" -DatabaseName "Orders" -PartnerServer "bk0b8kf65" -ContinuousCopy

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

This example creates a one-time copy of the database, "Orders", on the server, "lpqd0zbr8y", creating the database copy, "OrdersCopy", on the same server.

PS C:\>Start-AzureSqlDatabaseCopy -ServerName "lpqd0zbr8y" -DatabaseName "Orders" -PartnerDatabase "OrdersCopy"