Default port for SQL Server

asp.netSqlSql Server

asp.net Problem Overview


I need to know the default port settings for the following services

  1. SQL Server
  2. SQL Browser
  3. SQL Reporting services
  4. SQL Analysis services

I neeed to know the port settings for these services for different versions of SQL Server (2000,2005,2008)

Also let me know whether the default port setting will change based on sql server versions

Thanks in advance.

asp.net Solutions


Solution 1 - asp.net

  1. The default SQL Server port is 1433 but only if it's a default install. Named instances get a random port number.

  2. The browser service runs on port UDP 1434.

  3. Reporting services is a web service - so it's port 80, or 443 if it's SSL enabled.

  4. Analysis services is 2382 but only if it's a default install. Named instances get a random port number.

Solution 2 - asp.net

If you have access to the server then you can use

select local_tcp_port from sys.dm_exec_connections where local_tcp_port is not null

For full details see https://stackoverflow.com/questions/1281150/port-number-of-sql-server/5035779#5035779

Solution 3 - asp.net

The default, unnamed instance always gets port 1433 for TCP. UDP port 1434 is used by the SQL Browser service to allow named instances to be located. In SQL Server 2000 the first instance to be started took this role.

Non-default instances get their own dynamically-allocated port, by default. If necessary, for example to configure a firewall, you can set them explicitly. If you don't want to enable or allow access to SQL Browser, you have to either include the instance's port number in the connection string, or set it up with the Alias tab in cliconfg (SQL Server Client Network Utility) on each client machine.

For more information see SQL Server Browser Service on MSDN.

Solution 4 - asp.net

1433

the default port hasn't changed yet

Solution 5 - asp.net

SQL Server default port is 1434.

To allow remote access I had to release those ports on my firewall:

Protocol  |   Port
---------------------
UDP       |   1050
TCP       |   1050
TCP       |   1433
UDP       |   1434

Solution 6 - asp.net

You can use SQL Configuration Manager to set individual IP addresses to use dynamic ports or not (value of 0 = yes, use dynamic port), and to set the TCP port used for each IP.

But be careful: I recommend first mapping out your instances, IPs, and ports, and planning such that no instances or IPs step on each other before starting to make changes willy-nilly.

Solution 7 - asp.net

We can take a look at three different ways you can identify the port used by an instance of SQL Server.

  1. Reading SQL Server Error Logs

  2. Using SQL Server Configuration Manager

  3. Using Windows Application Event Viewer

    USE master
    GO

    xp_readerrorlog 0, 1, N'Server is listening on', 'any', NULL, NULL, N'asc'
    GO

> Identify Port used by SQL Server Database Engine Using SQL Server > Configuration Manager >

  1. Click Start -> Programs -> Microsoft SQL Server 2008 -> Configuration Tools -> SQL Server Configuration Manager >
  2. In SQL Server Configuration Manager, expand SQL Server Network Configuration and then select Protocols for on the > left panel. To identify the TCP/IP Port used by the SQL Server > Instance, right click onTCP/IP and select Properties from the drop > down as shown below.

For More Help
http://sqlnetcode.blogspot.com/2011/11/sql-server-identify-tcp-ip-port-being.html

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionbalaweblogView Question on Stackoverflow
Solution 1 - asp.netScottStonehouseView Answer on Stackoverflow
Solution 2 - asp.netJared MooreView Answer on Stackoverflow
Solution 3 - asp.netMike DimmickView Answer on Stackoverflow
Solution 4 - asp.netMladenView Answer on Stackoverflow
Solution 5 - asp.netleolegasView Answer on Stackoverflow
Solution 6 - asp.netpelazemView Answer on Stackoverflow
Solution 7 - asp.netgngolakiaView Answer on Stackoverflow