r/SQLServer • u/DarthDadVader • Jun 04 '26
Question Linux is able to connect to SQLEXPRESS instance with port, but not instance name
Howdy Redditors,
As the title says. I've got a Docker image on a Linux host trying to connect to my SQL Server 2022 Express instance hosted on a Windows server. I can connect just fine within the Docker image/container and also with SQLCMD from the Linux server if I specify the port (ie SERVERNAME,1433), but both Docker and SQLCMD fail with "Server is not found or not accessible" when specifying SERVERNAME\SQLEXPRESS. I've verified TCP is enabled within TCP/IP Properties (and even tried disabling Shared Memory and Named Pipes which were initially enabled), ensured that the IP address (IP2) entry is set to Active and Enabled, and set the IPall static port to 1433. And made sure the SQL Browser service is started. And I've temporarily disabled Windows Firewall on the SQL server to ensure ports aren't being blocked. I've also tried with IP address instead of hostname, and I've made sure the "\" character is escaped per Linux requirements.
So, I'm not down and out completely, but I'm stumped as to why this behavior is occurring. I've got the same setup going in a lower dev environment and it works just fine with the Instance name, and from what I can tell the configs are identical. What am I missing here? I've never had to troubleshoot the SQL Browser service before, it has always worked when the TCP/IP properties are configured correctly.
Thanks for any advice!
•
u/AutoModerator Jun 04 '26
After your question has been solved /u/DarthDadVader, please reply to the helpful user's comment with the phrase "Solution verified".
This will not only award a point to the contributor for their assistance but also update the post's flair to "Solved".
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
2
u/dbrownems Microsoft Employee Jun 04 '26
Resolving a named instance requires talking to the SQL Browser service on UDP port 1434.
But stepping back, you put an instance on port 1433 so you don't need a port or instance name. That's the default port so you can just use SERVERNAME.
0
u/demonarchist Jun 04 '26
Named instances aren't supported on Linux: https://learn.microsoft.com/en-us/sql/linux/sql-server-linux-editions-and-components-2025?view=sql-server-ver16#Unsupported