Connecting to Azure SQL Database Primary Endpoint – Failover Groups

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.

thegroup

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:

SSMSNO

I then connect.

fgfail

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>!

default

I change it to the database name of interest then I am in.

connecttodb

SSMS with a successful connection.

ssmsOK

A quick but hopefully a useful blog post.

 

 

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s