|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Thursday, May 16, 2013 7:56 AM
Points: 109,
Visits: 564
|
|
okbangas (3/1/2012)
Hi, just a little feedback. Under conclusion, you write: If the SQL Server Browser service is not running, connection strings will have to specify the port number in order to connect. As I understand it, this is partially correct. You do not have to specify port number if the server is listening on port 1433, as it does on default instances by default. Apart from this, it is correct, whether you have specified port numbers manually or not.
The SQL Browser service is only for named instances. If you change the default port of the default instance, you will always have to specify the new port number on client connections -- the browser service will not help.
For named instances, if you disable the browser service, then yes, you will also have to specify the port number. For named instances, if the browser service is enabled, then you won't have to specify the port number no matter the port number chosen in the SQL Configuration manager.
|
|
|
|
|
SSCarpal Tunnel
       
Group: General Forum Members
Last Login: Today @ 3:48 AM
Points: 4,422,
Visits: 7,177
|
|
Phil Brammer (3/1/2012) [quote]The SQL Browser service is only for named instances. If you change the default port of the default instance, you will always have to specify the new port number on client connections -- the browser service will not help.
That's my experience as well, at least for servers that aren't clustered. We have a default instance on our cluster server that's had its port changed, but we can still connect without specifying the port. I've checked that I haven't got any aliases set up.
John
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Yesterday @ 9:54 AM
Points: 198,
Visits: 680
|
|
Kelsey Thornton (3/1/2012) Very well explained but missing one useful point:
"Why would you want to change the port number in the first place?"
Seconded. I also suggest sharing how you mitigate the pain this can cause the developers who write apps that connect to the DB. (don't they all?)
I'd also mention the obvious warning that you shouldn't do this to a production server without considerable impact assessment and CYA/approval from management. Sure you can grep your filesystem for connection strings in sourcecode, but you'll start getting calls from users if your company allows Excel to connect to the DB directly. (you know workbooks multiply like rabbits, increasing the number of documents that would need to be updated)
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Thursday, May 16, 2013 7:56 AM
Points: 109,
Visits: 564
|
|
John Mitchell-245523 (3/1/2012)
Phil Brammer (3/1/2012) [quote]The SQL Browser service is only for named instances. If you change the default port of the default instance, you will always have to specify the new port number on client connections -- the browser service will not help.
That's my experience as well, at least for servers that aren't clustered. We have a default instance on our cluster server that's had its port changed, but we can still connect without specifying the port. I've checked that I haven't got any aliases set up. John
I suspect there are client aliases set up, or the port has not been changed. SSMS will always try to connect to 1433 for default instances unless you have a client alias set up or you specify the port in the connection string.
|
|
|
|
|
SSC Eights!
      
Group: General Forum Members
Last Login: Yesterday @ 2:31 PM
Points: 891,
Visits: 2,265
|
|
|
|
|
|
SSC-Dedicated
           
Group: Administrators
Last Login: Yesterday @ 2:54 PM
Points: 31,410,
Visits: 13,726
|
|
Kelsey Thornton (3/1/2012) I don't dispute there are many reasons why this might be desirable, or even required.
My point was simply that a little background information into why the port number was being changed might not be out of place in the article.
It's a bit like giving driving directions to #1544 Tree Road, Smalltown, WI and not saying "come to my party at 8 o'clock tonight"
Fair points, but this article was commissioned by me as a short way to show people how to change the port number. The directions in BOL have not been clear to many people.
The "why" article probably should be written, but this wasn't an attempt to cover every aspect of this topic.
Follow me on Twitter: @way0utwest
 Forum Etiquette: How to post data/code on a forum to get the best help
|
|
|
|
|
SSCarpal Tunnel
       
Group: General Forum Members
Last Login: Today @ 3:48 AM
Points: 4,422,
Visits: 7,177
|
|
Phil Brammer (3/1/2012) [quote] I suspect there are client aliases set up, or the port has not been changed. SSMS will always try to connect to 1433 for default instances unless you have a client alias set up or you specify the port in the connection string. No aliases - I've checked that. And if I try to telnet on port 1433 it doesn't work. Not that I'm complaining - I'd rather have something work when it's not expected to than the other way round!
Edit: I suppose the connection could be being made using Named Pipes.
John
|
|
|
|
|
Mr or Mrs. 500
      
Group: General Forum Members
Last Login: Monday, March 04, 2013 4:10 AM
Points: 532,
Visits: 281
|
|
Steve Jones - SSC Editor (3/1/2012)
<snip> Fair points, but this article was commissioned by me as a short way to show people how to change the port number. The directions in BOL have not been clear to many people.
The "why" article probably should be written, but this wasn't an attempt to cover every aspect of this topic. If the article had said something like "As the directions in BOL are unclear to many people, here is how to go about changing a port number" then that would also have been fine...
(I'm not bashing the article, it was simply a little "here's some information", that's all.)
Kelsey Thornton MBCS CITP
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Friday, March 02, 2012 3:29 AM
Points: 1,
Visits: 0
|
|
|
|
|