1

I want to connect to MSSQLSERVER default instance using non-default (non standard) TCP/IP port in connection string. By default we connect to default instance using 1433 port, and put server name in connect string (Server Name field in SQL Studio) for accessing the instance. How to change default port to other one and connect in SQL studio to default instance, without using custom port in connect string, using just server name?

1) Changed Default Port to other port in SQL Native Client 10.0 Configuration > Client Protocols > TCP/IP ---> Restarted instance - failed to connect

2) Changed default Port to other one in SQL Server Client Network Utility > ---> Restarted instance - failed to connect

not applicable

How to change default port to other one and connect in SQL studio to default instance, without using custom port in connect string, using just server name?

  • Possible duplicate of [How do you specify a different port number in SQL Management Studio?](https://stackoverflow.com/questions/89576/how-do-you-specify-a-different-port-number-in-sql-management-studio) – Andrei Odegov Jun 25 '19 at 11:14
  • @AndreiOdegov unless I am mistaken, the answer in this link adds the port to the connection string, that is what the OP said he does not wants – GuidoG Jun 25 '19 at 11:52
  • why can you not use the port in the connection string ? That is the normal way to do this – GuidoG Jun 25 '19 at 11:53
  • GuidoG - that is true. MSSQLSERVER default instance connection uses default port 1433, but many companies strengthen their security level by changing default port without impacting connection by application. – bulat makhmutov Jun 25 '19 at 12:07

1 Answers1

1

If you don't want to put the port number in the connection string explicitly, you have two options:

  • Run the Browser Service
  • Create a SQL Server Alias on all your client machines, using the SQL Server Configuration Manager tool. You'll have to specify the port in the alias, but it won't be in the connection string.
Brian
  • 1,238
  • 2
  • 11
  • 17