Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

SQL Server is listening on... what port

Posted on 2014-04-30
3
Medium Priority
?
1,418 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

Hi all, It is important and often overlooked to understand “Database properties”. Often we see questions about "log files" or "where is the database" and one of the easiest ways to get general information about your database is to use “Database p…
How to leverage one TLS certificate to encrypt Microsoft SQL traffic and Remote Desktop Services, versus creating multiple tickets for the same server.
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

722 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