Indicium connect to Database on another port

  • 16 March 2023
  • 2 replies

Userlevel 5
Badge +16
  • Thinkwise Local Partner Brasil
  • 387 replies

I'm setting up our new server and we are running databases as containers on different ports. 

How do I define this in the indicium app settings.. I'm connected via SMSS but I get indicum error that no connection can be made. 

Is below correct?

 "Server": "Localhost,1510",


 System.AggregateException: One or more errors occurred. (A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: TCP Provider, error: 40 - Could not open a connection to SQL Server: Could not open a connection to SQL Server))


Best answer by Leon Kroon 17 March 2023, 10:42

View original

This topic has been closed for comments

2 replies

Hi @Freddy, when referring to Localhost, the Indicium container will try to connect with itself on port 1433. Each container you run has its own internal IP address. To connect to a database, you will need to specify the correct hostname or IP address. If these containers are run on Docker, the internal DNS of Docker could be used for this to avoid hardcoded IP addresses (in case of connecting from one container to another).

For example, a service defined with the name “container1” in a Docker Compose file can be resolved (and pinged) by all other services with containers defined in this same Docker Compose file, because Docker Compose automatically puts all defined services in the file into the same custom network.
The same can be achieved by manually putting all created containers into the same custom Docker network.

Userlevel 6
Badge +16

@Freddy  did Leon's answer help you to implement this?