When you have setup a Failover Group in Azure for your SQL Databases connecting to the R/W (Read / Write) endpoint via SSMS (SQL Server Management Studio) is pretty simple, if you remember one little thing, which will be the discussion point for this blog post.
I wrote about Failover Groups last month https://blobeater.blog/2017/09/25/azure-sql-database-active-geo-replication-changes/ but I never discussed how to connect to the read/write endpoint which will be the primary database server within the relationship, for some reason I decided to concentrate on the read-only endpoint!
Anyways, at a high level I have the following setup. DB1 and DB2 that are on the primary SQL Server called SQL1 where they are in a replication partnership via a Failover Group to a SQL Server in the other data centre called SQL2.
It looks like the below.
I want to connect to the Read/Write listener endpoint which really is the sql1 server shown above. So in SSMS it will look like this:
I then connect.
What did I do wrong? Firewalls rules are correct, the username and password are correct (I am using the server admin account) and the server name is correct. Its simple. You need to click that options button and point to the database of interest. It will NOT work with <default>!
I change it to the database name of interest then I am in.
SSMS with a successful connection.
A quick but hopefully a useful blog post.