SQL Server Active/Active Clustered Instance & port numbers

Hi Friends,

Today I got a tricky situation & would like to share the same with you.

We have 2 Nodes and has one instance running on each of them. Both are Named Instances (Clustered).

Here the requirement is that the end user should only use  dedicated name means something that is predefined.

Example: NODE1 & NODE2 are Node Names

                VSERVER1\INST1 & VSERVER2\INST2 are Instance Names.

Client want their names as say  EG1 for VSERVER1\INST1 & EG2 for VSERVER1\INST2

How can we achieve this?

Before providing the solution I would like to share an ADD-ON as well.

Do you think is it possible to configure both the clustered instances to run on same port (1433)?

Many of us would definitely think about it for a second and might go wrong as well. The answer is YES it can always Listen on 1433 because each FAIL-OVER CLUSTERED INSTANCE has
at-least  one dedicated IP address which makes unique socket combination.

Having said now you can connect from any machine and can give only virtual server name instead of virtual server name\instance name if my instance is running on port 1433.

So coming back to client's requirement how will we achieve this? Well there are 2 ways

1) HOSTNAME Alias or DNS Alias

2) SQL Server Alias or Client Alias

First I will go with SQL Server Alias which is most familiar to us. This can be done from SQL Server Configuration Manager  as you can see from below image. The only problem is it will work only on the machines where you configure this. Say if you have 200 different machines that connect to your database server you need to configure this on all the machines which it would not be viable.
















Next we will go through with DNS Alias as the name itself suggests this needs to be configured at AD level inside the DNS Manager. The Major Advantage is unlike client Alias we just need to create this just once.

This has been explained in this link

DNS ALIAS:

PROS: Needs to be configured just once.

CONS: Single point of failure. If DNS is down,all the clients using this alias would get affected.

CLIENT ALIAS:

PROS: Easy to configure.
            No need of co-operation across different teams.
            Can be Configured even with different port than that of 1433

CONS:  Would be tedious if we have many client machines talking to DB Server.

I hope this would give you some Idea when configuring Alias & working on Different ports.








Comments