Connection string to connect to a SQL cluster

NM 41 Reputation points
2021-04-15T14:20:19.337+00:00

Hello,

How can i connect to a SQL cluster instance using javascript. Do i have to configure a listener ?

or is there some other standard way of doing this. Please, sugget.

Thanks,
NM

Windows for business | Windows Server | Storage high availability | Clustering and high availability
SQL Server | Other
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Cris Zhan-MSFT 6,661 Reputation points
    2021-04-16T03:17:43.5+00:00

    Hi @NM ,

    The "Listener" is the component/method of connecting the Always on availability group.

    To connect to SQL Server FCI (Failover Cluster Instance), you need to specify the cluster network name or IP address (if it is a named instance, you must specify the cluster name or IP address\instance name) so that the application can be transparent Connect to the active node without being affected by failover.

    There are two resources of the SQL Server FCI's own dedicated virtual network name and IP address in the SQL Server resource group (ie SQL Server FCI) on the Windows failover cluster, They provide the server name or IP address used by the application to access the SQL Server FCI.


  2. NM 41 Reputation points
    2021-04-17T09:40:08.76+00:00

    Thanks for the reply but i am still not able to connect to the instance.

    My configuration -

    1. It's a 2 node Fail over cluster.
    2. Both the nodes are on 2 different subnet.
    3. Node 1 IP - 192.168.10.1
    4. Node 2 IP - 192.169.10.1
    5. My SQL instance name - sqlcluster
    6. When i installed SQL(cluster install) on Node 1 it took ip as 192.168.10.80
    7. When i installed and added SQL to the above cluster it took another ip as 192.169.10.80
    8. So, now instance sqlcluster has 2 ip's - 192.168.10.80, 192.169.10.80

    IS there any additional configuration that i would have to do.

    Please suggest.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.