Another post for me that is simple and hopefully serves as an example for people trying to get blogging as #SQLNewBloggers.
I recently blogged about finding the port your SQL Server uses. At the end of that post I showed a connection to a server using a port. This is something I’ve used rarely, but it’s been very helpful.
The specification for specifying a port can vary. For example, my build server at home runs TeamCity on port 8077. In my case, the URL to connect is:
If I had an FQDN, I might have this instead:
When I connect to SQL Server, I get this dialog:
Some of you might note there is a “Connection Properties” tab, but there’s no port setting there, even if you choose TCP/IP.
When I connect, I give a server name. In the example above, I used “.\SQL2016”. The default is that my client will try to connect on 1433 or use the SQLBrowser to get the port. However, I could specify the instance name like this:
For this instance, that wouldn’t work as the port is 6077. I’d have to write this:
But since I’m choosing a port, I don’t need that. I can use
and I’ll connect.
Learn to use the port in your connection string. At some point, this will help you to troubleshoot connection issues.
This is a quick, easy post to write. It’s five minutes work for most of you. Maybe 10 if you have to Google/Bing.