New-​Azure​Rm​Sql​Database​Secondary

Creates a secondary database for an existing database and starts data replication.

Syntax

New-AzureRmSqlDatabaseSecondary
   [-ResourceGroupName] <String>
   [-ServerName] <String>
   [-DatabaseName] <String>
   [-AllowConnections <AllowConnections>]
   -PartnerResourceGroupName <String>
   -PartnerServerName <String>
   [-SecondaryElasticPoolName <String>]
   [-SecondaryServiceObjectiveName <String>]
   [-Tags <Hashtable>]
   [-Confirm]
   [-WhatIf]
   [<CommonParameters>]

Description

The New-AzureRMSqlDatabaseSecondary cmdlet replaces the Start-AzureSqlDatabaseCopy cmdlet when used for setting up geo-replication for a database. It returns the geo-replication link object from the primary to the secondary database.

Examples

1:

Required Parameters

-DatabaseName

Specifies the name of the database to act as primary.

Type:String
Position:2
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-PartnerResourceGroupName

Specifies the name of the Azure Resource Group to which this cmdlet assigns the secondary database.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-PartnerServerName

Specifies the name of the Azure SQL database server to act as secondary.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ResourceGroupName

Specifies the name of the Azure Resource Group to which this cmdlet assigns the primary database.

Type:String
Position:0
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-ServerName

Specifies the name of the SQL Server of the primary SQL Database.

Type:String
Position:1
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False

Optional Parameters

-AllowConnections

Specifies the read intent of the secondary Azure SQL Database. The acceptable values for this parameter are:

  • No
  • All
Type:AllowConnections
Parameter Sets:No, All
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Confirm

Prompts you for confirmation before running the cmdlet.

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

Specifies the name of the elastic pool in which to put the secondary database.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-SecondaryServiceObjectiveName

Specifies the name of the service objective to assign to the secondary database.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Tags

Specifies the tags to associate with the SQL Database replication link.

Type:Hashtable
Aliases:Tag
Position:Named
Default value:None
Accept pipeline input:False
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
Accept pipeline input:False
Accept wildcard characters:False

Inputs

You can pipe instances of the Database object for the primary database to this cmdlet.

Outputs

This cmdlet returns ReplicationLink objects.