mssql-docker icon indicating copy to clipboard operation
mssql-docker copied to clipboard

How to put instance name

Open buster95 opened this issue 5 years ago • 11 comments

I want to put instance name for my sql server for example 192.168.1.10\rh 192.168.1.10\finance 192.168.1.10\users

buster95 avatar Oct 13 '19 01:10 buster95

There is no concept of a named instance. Every container can have a unique name. See Getting started with SQL Sever on Linux container images

banerjeeamit avatar Oct 13 '19 22:10 banerjeeamit

I know each container have your own name, but I refer to this word-image-25 green is container name, red is instance name

Sql Server Installation Assistant 0336 120611_0136_Pasoapasopa22

buster95 avatar Oct 14 '19 06:10 buster95

Containers don't have a concept of running multiple SQL Server instances. So there is no option of running more than one instance name. Could you please share the scenario that you are trying to achieve in a container?

banerjeeamit avatar Oct 14 '19 06:10 banerjeeamit

yes that's true, containers can only run one sql server instance, but in my work the database production server has 3 personalized instances, for example 192.168.1.10\rrhh 192.168.1.10\finanzas 192.168.1.10\admin

we have sql server enterprise licensed all systems in my work make references to respective instance, we want hold on same configuration for all systems,

I want to configure 3 containers each one with a personalized instance and 1 container with the default instance name

buster95 avatar Oct 14 '19 06:10 buster95

actually we are migrating from a conventional services configuration to kubernetes

buster95 avatar Oct 14 '19 06:10 buster95

You can configure each instance inside container listening on different port. You can workaround this by creating client aliases or directly using port number in the application.

blakhani-msft avatar Oct 14 '19 06:10 blakhani-msft

You can configure each instance inside container listening on different port. You can workaround this by creating client aliases or directly using port number in the application.

Hi,we want hold on aliases because all systems having the aliases in connections strings and we won't modify all systems, How can I make client alias in the container??

buster95 avatar Oct 14 '19 06:10 buster95

Hi,we want hold on aliases because all systems having the aliases in connections strings and we won't modify all systems, How can I make client alias in the container??

Well, client alias needs to be created on clients not inside containers. There is no need to change connection string. Lets say you create 3 containers on 192.168.1.10 listening on port 2433, 3433 and 4433. On client, you would create alias where "192.168.1.10\rrhh" would map to 192.168.1.10. port 2433 and so on.

blakhani-msft avatar Oct 14 '19 07:10 blakhani-msft

Is it possible toncreate client aliases in Linux machines? Most of the solutions I have seen is using SQL Server's GUI client, but this won't available in Linux. A lot of apps are deployed on Docker/Linux these days, so a solution world help. I think this is solution is better than changing the connection strings.

Sorry for posting in this old thread. This is the one of the top results that came up when I searched for client aliases in Linux.

ghost avatar Oct 13 '20 18:10 ghost

Well, client alias needs to be created on clients not inside containers. There is no need to change connection string. Lets say you create 3 containers on 192.168.1.10 listening on port 2433, 3433 and 4433. On client, you would create alias where "192.168.1.10\rrhh" would map to 192.168.1.10. port 2433 and so on.

"On client, you would create alias" How? What kind of alias?

dudeNumber4 avatar Jan 14 '21 20:01 dudeNumber4

Hello everyone,

I'm having the same issue. Since I have a local installation of Sql server on my host, I was wondering if I could have a container running on the default port(1433) and a different instance name. Based on previous conversations, I assume that this is not possible and the only way is to give the container a different port number. Am I right?

arminmoshayedi avatar Nov 29 '23 18:11 arminmoshayedi