Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

SQL Server is listening on... what port

Posted on 2014-04-30
3
Medium Priority
?
1,483 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 1000 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 23

Accepted Solution

by:
Steve Wales earned 1000 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

Fill in the form and get your FREE NFR key NOW!

Veeam is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
Screencast - Getting to Know the Pipeline
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…

824 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