Skip to content

Commit 1c1b565

Browse files
committed
Add example of using new PartnerDatabaseName param
1 parent bb0f64c commit 1c1b565

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Sql/Sql/help/New-AzSqlDatabaseSecondary.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,11 @@ the primary to the secondary database.
4343
$database = Get-AzSqlDatabase -DatabaseName $databasename -ResourceGroupName $primaryresourcegroupname -ServerName $primaryservername
4444
$database | New-AzSqlDatabaseSecondary -PartnerResourceGroupName $secondaryresourcegroupname -PartnerServerName $secondaryservername -AllowConnections "All"
4545
```
46+
### 2: Establish Active Geo-Replication and specify the partner database name to be different than the source database name
47+
```
48+
$database = Get-AzSqlDatabase -DatabaseName $databasename -ResourceGroupName $primaryresourcegroupname -ServerName $primaryservername
49+
$database | New-AzSqlDatabaseSecondary -PartnerResourceGroupName $secondaryresourcegroupname -PartnerServerName $secondaryservername -PartnerDatabaseName $secondarydatabasename -AllowConnections "All"
50+
```
4651

4752
## PARAMETERS
4853

0 commit comments

Comments
 (0)