Hi,
I'am testing SQL 2016 Basic Availability Groups
I created Test AG, everything shows OK but after restart, secondary server lost connection
In AG dashboard I see error:
The availability group is not ready for automatic failover. The primary replica and a secondary replica are configured for automatic failover, however, the secondary replica is not ready for an automatic failover. Possibly the secondary replica is unavailable, or its data synchronization state is currently not in the SYNCHRONIZED synchronization state.
Maybe I something miss
I used scripts:
---on test1 server
USE master
GO
CREATE AVAILABILITY GROUP TestAG
WITH
(
AUTOMATED_BACKUP_PREFERENCE = PRIMARY,
BASIC,
DB_FAILOVER = OFF,
DTC_SUPPORT = NONE
)
FOR DATABASE [testdb1]
REPLICA ON
'sql16-test1' WITH
(
ENDPOINT_URL = 'TCP://sql16-test1.mydomain.internal:5022',
FAILOVER_MODE = AUTOMATIC,
AVAILABILITY_MODE = SYNCHRONOUS_COMMIT,
SECONDARY_ROLE
(
ALLOW_CONNECTIONS = NO
)
),
'sql16-test2' WITH
(
ENDPOINT_URL = 'TCP://sql16-test2.mydomain.internal:5022',
FAILOVER_MODE = AUTOMATIC,
AVAILABILITY_MODE = SYNCHRONOUS_COMMIT,
SECONDARY_ROLE
(
ALLOW_CONNECTIONS = NO
)
)
GO
----- on Test2 server
ALTER AVAILABILITY GROUP [TestAG] JOINGO