Reputation: 401
Fg2 is a failover group containing primary server scsql02 (on elastic pool scep02) and secondary server ncsql02 (on elastic pool ncep02). The primary server/pool has 54 databases, secondary server/pool has zero databases. Based upon what I have read in the documentation I should be able to add the scep02 databases to ncep02 via the portal. After selecting all scsql02 databases to be added, a message is displayed “As scep02 does not exist on ncsql02, you need to create it by clicking here.”
My understanding of what I have read in the MS documentation is the primary pool databases are added to the secondary pool in order to replicate the primary databases to the secondary pool/server while making them part of Fg2. Are primary databases in an elastic pool not placed into the secondary elastic pool? What am I missing?
Upvotes: 0
Views: 1114
Reputation: 401
Yes, I missed this completely in the form of two sentences in the middle of https://learn.microsoft.com/en-us/azure/sql-database/sql-database-geo-replication-overview. "If the primary database is in an elastic pool, the secondary is automatically created in the elastic pool with the same name. If you add a database that already has a secondary database in the secondary server, that geo-replication is inherited by the group." This is precisely the observed behavior.
Upvotes: 1
Reputation: 16431
You have a failover group: Fg2, two sql servers: scsql02 and ncsql02, and want to set sql server ncsql02 as secondary server. The error: “As scep02 does not exist on ncsql02, you need to create it by clicking here” may be caused by you didn’t configure the secondary server. Manage your failover group, and configure the Secondary server: ncsql02:
Upvotes: 0
Reputation: 15702
Please create the elastic pool, move all databases to the pool, then create the failover group and add all databases on the elastic pool to the failover group as shown below:
PS C:\> $failoverGroup = Get-AzureRmSqlDatabaseFailoverGroup -ResourceGroupName rg -ServerName primaryserver -FailoverGroupName fg
PS C:\> $databases = Get-AzureRmSqlElasticPoolDatabase -ResourceGroupName rg -ServerName primaryserver -ElasticPoolName pool1
PS C:\> $failoverGroup = $failoverGroup | Add-AzureRmSqlDatabaseToFailoverGroup -Database $databases
Upvotes: 0