0

The application in the configuration has the given name (localdb)/MyProj. I do not want to change the application code to connect to the server, so for this purpose I wanted to use the aliasing functionality available in SQL Server Configuration Manager.

In SQL Server Configuration Manager: In Client Protocols I set TCP/IP and Named Pipes to Enabled. In aliases, I added two new aliases. Alias name: (localdb)/MyProj Port No: 1433 Protocol: TCP/IP Server: MyServer

and another with a different name: MyProj

In Protocols for MSSQLSERVER > TCP/IP > I have TCP Port 1433 set. I checked with cmd netstat -an if the port is listening, it is. I restarted the service and the machine. SELECT @@SERVERNAME returns MyServer

Using Microsoft SQL Server Management Studio with MyServer or MyServer,1433 or using ip I can connect to the server.

However, none of the prepared aliases work. What else should I check or change to use an alias?

A510
  • 298
  • 1
  • 4
  • 9
  • You set the aliases on the client computer, not the server, right? Can the client connect using MyServer, or MyServer,1433? – David Browne - Microsoft May 29 '23 at 17:56
  • 2
    Have you genericized the name by calling it `(localdb)` or is it actually `(localdb)`? Sounds like an application-managed LocalDB instance - and you shouldn't be able to connect to that using SSMS. – AlwaysLearning May 29 '23 at 21:25
  • @AlwaysLearning In the application I have given the name (localdb)/MyProj. Only MyProj is changed. That's why I created two aliases to test their operation also in SSMS. – A510 May 30 '23 at 08:46
  • @DavidBrowne-Microsoft The server and the application are on a local machine. I also set the aliases on the local machine. – A510 May 30 '23 at 08:47

0 Answers0