Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to put instance name #515

Open
buster95 opened this issue Oct 13, 2019 · 11 comments
Open

How to put instance name #515

buster95 opened this issue Oct 13, 2019 · 11 comments

Comments

@buster95
Copy link

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

@banerjeeamit
Copy link
Contributor

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

@buster95
Copy link
Author

buster95 commented Oct 14, 2019

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

@banerjeeamit
Copy link
Contributor

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 banerjeeamit reopened this Oct 14, 2019
@buster95
Copy link
Author

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
Copy link
Author

actually we are migrating from a conventional services configuration to kubernetes

@blakhani-msft
Copy link

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.

@buster95
Copy link
Author

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??

@blakhani-msft
Copy link

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.

@ghost
Copy link

ghost commented Oct 13, 2020

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.

@dudeNumber4
Copy link

dudeNumber4 commented Jan 14, 2021

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?

@arminmoshayedi
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants