Connecting data from SQL SERVER to Metabase

#1

I would like to be informed about what exactly I need to fill in the fields (I am using SQL server windows Authentication, metabase on docker). I am getting the following msg: error in connecting to server.

Host ( is it localhost:3000 ? )
Port (where do I get this from?)

Database name ( is it the name of the database where my table of data exists? I am using master in my case)
Database instance name (is it what I find after machine\ on the sql server info)?

Database username (is it my windows username)
Database password ( is it windows password)

#2

Hi @Rama

You should probably read up on the documentation of SQL Server:
https://docs.microsoft.com/en-us/sql/relational-databases/lesson-1-connecting-to-the-database-engine?view=sql-server-2017

Host would be the server running MSSQL. So if you’re running Docker on the same server as MSSQL, then you need to make a network connection between the Metabase container and the Docker host. You’ll need to find the Docker host IP - and probably open firewall rules to allow connections.
https://nickjanetakis.com/blog/docker-tip-65-get-your-docker-hosts-ip-address-from-in-a-container

Port depends on your setup and your MSSQL instance:
https://stackoverflow.com/questions/12297475/how-to-find-sql-server-running-port

Database name would be master in your case.

Database instance is MSSQLSERVER by default unless you’ve changed it:
https://stackoverflow.com/questions/18070177/how-to-get-current-instance-name-from-t-sql

Database username and Database password is the authentication. So it could be your Windows credentials, but if you’ve created logins (see the first link), then you would use those.

#3

Thank you very much. I entered all fields as required but I am still getting: server connection error. I believe it might have to do with “opening firewall rules to allow connections” you mentioned in your reply.

The Docker host IP is my local machine but what is the metabase container host ? Is it localhost:3000 and where do I need to connect the two hosts on firewall settings (is it: Specify the computers between which secured connections will be established using IPsec)? can you send me a snapshot? thanks

#4

Your Docker host IP is usually a different IP from your local physical machine.
And the Metabase container will also have it’s own IP.
localhost is a system controlled name, which normally refers to 127.0.0.1
I don’t know your setup. You need to read a lot more about Docker and how to manage that.
Otherwise try using the JAR-file instead, if that’s easier.