MSSQL Datasource: Connection to Named Instance not working

Hello friends,

I have connection issues if I try to add a mssql datasource with a named instance.

We have 2 named instances running on the same host:

Host: db02
Named instance 1: erp
Named instance 2: app

If I add a database from the named instance “erp” and enter “db02\erp” the Host field, it works:

If I try to add a database from the named instance “app”, and enter “db02\app” in the host field, I receive a connection refused error:

The credentials that I use are correct, and were verified multiple times using SQL Server Managament Studio.

There is another thing that I’ve noticed going through the connection logs of the SQL server:

If I enter “db02\erp” or even just “db02”, without the instance name, inside the Host field, Grafana is establishing a connection with the “erp” named instance.
If I enter “db02\app” inside the Host field, Grafana is still trying to establish a connection with the “erp” named instance, instead of the “app” instance that is used.
It looks like Grafana would completely ignore everything that comes after the "" backslash and instead is just targeting the default instance “erp”.

The Grafana version that I’m using is 7.3.6.

Am I missing something? Any suggestions?

Best regards

1 Like

Ok, solved this by just assigning a desired TCP/IP port to a certain instance on the SQL-server, and went with the port instead, like “db02:4000”, instead of “db02\app”.

1 Like

This is not a good solution, as a developer I might have access to run queries in a SQL Server but not to change TCP/IP configuration of the server. Please allow naming instances instead.

1 Like

Completely agree with @hfmm99. It should not require this change to a different TCP/IP port.

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.