Solved

SQL Server is listening on... what port

Posted on 2014-04-30
3
1,176 Views
Last Modified: 2014-05-07
exec master..xp_readerrorlog 0, 1, 'Server is listening on'

is showing

"
Server is listening on [ 'any' <ipv6> 1433].
Server is listening on [ 'any' <ipv4> 1433].
Server is listening on [ ::1 <ipv6> 62098].
Server is listening on [ 127.0.0.1 <ipv4> 62098].
"

as the result set..

how could 2 ports be listening @ same time?

i tried another server and below is what i got there:

Server is listening on [ 'any' <ipv6> 1433].
Server is listening on [ 'any' <ipv4> 1433].
Server is listening on [ ::1 <ipv6> 1434].
Server is listening on [ 127.0.0.1 <ipv4> 1434].
0
Comment
Question by:25112
3 Comments
 
LVL 8

Assisted Solution

by:ProjectChampion
ProjectChampion earned 250 total points
ID: 40032070
As for 'How' they are different ports on different IPs; it's perfectly possible to setup SQL Server to lsiten to different ports on different IPs. As to 'Why' your server has been setup like that my guess is as good as yours.

you can query sys.dm_exec_connections to find out which port you are using in the context of your current connection (e.g. select client_net_address from sys.dm_exec_connections where session_id=@@spid).

Are you experiencing any problem with server?
0
 
LVL 5

Author Comment

by:25112
ID: 40032260
did you mean
select local_tcp_port from sys.dm_exec_connections where session_id=@@spid ?

no problems right now.. but need to install another sql instance and need to make sure i won't be installing in another man's ground!

when you run in your environment
exec master..xp_readerrorlog 0, 1, 'Server is listening on'
do you get only one port that you assigned?
0
 
LVL 22

Accepted Solution

by:
Steve Wales earned 250 total points
ID: 40033592
Have a read of this article:

http://msdn.microsoft.com/en-us/library/ms175483%28v=sql.90%29.aspx

Looks like by default, 1433 is the port that the listener is using (by default) for incoming connections.

1434 appears to be used by the SQL Server Browser Service (again, by default):
http://msdn.microsoft.com/en-us/library/ms181087%28v=sql.90%29.aspx

The relevant passage from the first link is:
The network administrator should configure the firewall to forward communication to SQL Server for the IP address and TCP port that the instance of the Database Engine is listening on (either TCP port 1433 for a default instance, or the TCP port you configured for a named instance). Also, because Microsoft SQL Server 2005 uses UDP port 1434 to establish communications links from applications, have the network administrator configure the firewall to forward requests for UDP port 1434 on the same IP address. For more information about UDP port 1434, see SQL Server Browser Service.
0

Featured Post

Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

Join & Write a Comment

I have written a PowerShell script to "walk" the security structure of each SQL instance to find:         Each Login (Windows or SQL)             * Its Server Roles             * Every database to which the login is mapped             * The associated "Database User" for this …
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now