Can we create "Server Aliases" in Linux clients (webservers etc.) so that you can change connections without touching the application's DB URL string?

The official documentation seems to talk about a GUI way of doing this in Windows, so I was wondering if something like this exists for Linux. This has lots of benefits, especially during containerization of apps.

My high level objective is to see if I can create some level of indirection so that the application always thinks of DB as DSN=myDsn;Uid=myUsername;Pwd=myPwd; while the real driver redirects it to DSN=realDsn;Uid=realUsername;Pwd=realPwd;. Initially I was thinking of something like socat, but I am not sure how password changes can be handled! "Server Aliases for client" seems to do something like this, hence the question.


Aliases on Windows are set using the SQL Server Configuration Manager GUI. The Linux equivalent is mssql-conf, but there isn't an equivalent to aliases on Linux.

(I don't think this is a case of "isn't supported yet" related to Linux support being relatively new. My guess on the future is just a hunch & guessing rather than fact.)

If you need server name redirection, I'd recommend using a CNAME to redirect that name for all clients centrally, rather than a client by client setting. Alternatively, I'd use the hosts file to redirect from one server name to another.

If you need to also do credential impersonation (your example implies this), allowing the user to supply one credential, and using something different to connect to the database, that sounds like something to be handled by your application, rather than expecting the drivers to do it for you.

| improve this answer | |
  • Thank you for clarifying this. Agree, application seems to be the right place for storing passwords. – Nishant Oct 16 at 4:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.