[SOLVED] Failure to connect to a local instance of SQL Server

Hi All,

I am running Metabase 0.35 on a windows 10. I am trying to connect to a local instance of SQL Server. But to no avail. Although I am able to connect to a remote instance of SQL with no problems, see the screenshot below.

I have tried to search for a solution to no avail. I would appreciate if someone had a similar challenge and has figured out the connection issue.

Is SSL configured? First step would be to turn that off and see if it works. I can’t think of a benefit to SSL with a local connection.
Also, can you ping that address from the local computer? Might be a DNS issue - try the local IP address or add an entry to your HOSTS file.

The connection in the screenshot above works what is failing is the local instance. Although using the same credentials I am able to connect to the same database using Visual Studio code and RStudio. Only metabase connection is failing.

@asimumba Perhaps you’re using dynamic ports on the local instance, which means you shouldn’t fill out the port field in Metabase.
Or perhaps you’re using Docker, where localhost refers to the container, not the host.

Let me try you suggestion. But I tried to ping the port I am getting a Null value from MSSM studio.

I later managed to sort out the port issue and connected successfully. But this only happened after installing a developer version of SQL server because with the Express version, I was unable to check the port. I used the following command xp_readerrorlog 0, 1, N'Server is listening on' to check the port. I later changed the port from dynamic to static and the connection was successful.

1 Like