I’ve noticed that if I don’t supply a port when I build a connection string I can still connect to SQL Server via a named instance that looks like [SERVER][INSTANCE_NAME].
Is sqlclient automatically gathering the port number for me? Do I have to concern myself with port number even if the instance is the default instance?
I’m sorry if this question seems novice. Google just hasn’t turned anything up for me.
Thank you!
Well usually the default port that SQL Server listens on is 1433 so you dont need to specify the port number in the connection string.
There is a nice article that gives some more info on the subject:
http://benchmarkitconsulting.com/colin-stasiuk/2009/02/02/what-tcp-port-is-sql-server-running-under/