Sie sind auf Seite 1von 3

Check SQL Server Port Availability

Ensure each SQL Server Port is open and SQL Server can communicate via TCP/IP on Windows Server Firewall
after a new SQL Server Install.

Ports:
Protocol Port Description

TCP ports 80 and 443 are most typically used for report server access. However, they also support URL requests to SQL Server and
80,
TCP Analysis Services. TCP 80 is the standard port for HTTP connections that use a URL. TCP 443 is used for HTTPS connections that
443
use secure sockets layer (SSL).

SQL Transact Debugger/RPC - if you plan to remote debug stored procedures, etc.

TCP 135 TCP port 135 has several uses. The Transact-SQL debugger uses the port. TCP 135 is also used to start, stop, and control SQL Server

Integration Services, although it is required only if you connect to a remote instance of the service from SSMS.

SQL Server Default Instance - Database engine : both application and management studio connectivity
TCP port 1433 is the default port for SQL Server. This port is also the official Internet Assigned Number Authority (IANA) socket

TCP 1433 number for SQL Server. Client systems use TCP 1433 to connect to the database engine; SQL Server Management Studio (SSMS)

uses the port to manage SQL Server instances across the network. You can reconfigure SQL Server to listen on a different port, but

1433 is by far the most common implementation.

SQL Server Admin Connection - “Administration Connection” or SQL Browser : management studio connectivity

TCP 1434 TCP port 1434 is the default port for the Dedicated Admin Connection. You can start the Dedicated Admin Connection through

sqlcmd or by typing ADMIN: followed by the server name in the SSMS Connect to Database Engine dialog box.

SQL Server Browser - required for management studio


TCP port 2382 is used for connection requests to a named instance of Analysis Services. Much like the SQL Server Browser service
TCP 2382
does for the relational database engine on UDP 1434, the SQL Server Browser listens on TCP 2382 for requests for Analysis Services

named instances. Analysis Services then redirects the request to the appropriate port for the named instance.

SQL Analysis Services - both application and management studio connectivity


TCP 2383
TCP port 2383 is the default port for SQL Server Analysis Services.

SQL Service Broker (Unofficial TCP Ports) - only if you use SQL Server Service Broker

TCP 4022 Microsoft uses TCP port 4022 for SQL Server Service Broker examples in SQL Server Books Online. Likewise, BOL Database

Mirroring examples use TCP port 7022.

TCP 5022 SQL Service Database Mirror

SQL Server Browser Multicast Response

UDP 1434 UDP port 1434 is used for SQL Server named instances. The SQL Server Browser service listens on this port for incoming

connections to a named instance. The service then responds to the client with the TCP port number for the requested named instance.

Ports Used By the Database Engine


The following table lists the ports that are frequently used by the Database Engine.
Scenario Port Comments

SQL Server default This is the most common port allowed through the firewall.

instance running TCP port 1433 It applies to routine connections to the default installation of

over TCP the Database Engine, or a named instance that is the only
instance running on the computer. (Named instances have

special considerations. See Dynamic Ports later in this topic.)

SQL Server named


See the discussion below in the section Dynamic Ports. UDP
instances in the The TCP port is a dynamic port determined at the time the
port 1434 might be required for the SQL Server Browser
default Database Engine starts.
Service when you are using named instances.
configuration

SQL Server named

instances when
The port number configured by the administrator. See the discussion below in the section Dynamic Ports.
they are configured

to use a fixed port

By default, remote connections to the Dedicated

Dedicated Admin TCP port 1434 for the default instance. Other ports are used for Administrator Connection (DAC) are not enabled. To enable

Connection named instances. Check the error log for the port number. remote DAC, use the Surface Area Configuration facet. For

more information, see Surface Area Configuration.

The SQL Server Browser service listens for incoming

connections to a named instance and provides the client the

TCP port number that corresponds to that named instance.

SQL Server Normally the SQL Server Browser service is started


UDP port 1434
Browser service whenever named instances of the Database Engine are used.

The SQL Server Browser service does not have to be started

if the client is configured to connect to the specific port of

the named instance.

SQL Server
Can be specified when an HTTP endpoint is created. The default is
instance running
TCP port 80 for CLEAR_PORT traffic and 443 for SSL_PORT Used for an HTTP connection through a URL.
over an HTTP
traffic.
endpoint.

SQL Server default

instance running Used for an HTTPS connection through a URL. HTTPS is an


TCP port 443
over an HTTPS HTTP connection that uses secure sockets layer (SSL).

endpoint.

TCP port 4022. To verify the port used, execute the following

query: There is no default port for SQL Server Service Broker, but

Service Broker SELECT name, protocol_desc, port, state_desc this is the conventional configuration used in Books Online

FROM sys.tcp_endpoints examples.

WHERE type_desc = 'SERVICE_BROKER'

Administrator chosen port. To determine the port, execute the There is no default port for database mirroring however

following query: Books Online examples use TCP port 7022. It is very

Database Mirroring SELECT name, protocol_desc, port, state_desc important to avoid interrupting an in-use mirroring endpoint,

FROM sys.tcp_endpoints especially in high-safety mode with automatic failover. Your

WHERE type_desc = 'DATABASE_MIRRORING' firewall configuration must avoid breaking quorum. For
more information, see Specify a Server Network Address

(Database Mirroring).

Replication connections to SQL Server use the typical regular

Database Engine ports (TCP port 1433 for the default instance,
For sync over HTTP, replication uses the IIS endpoint (ports
etc.)
for which are configurable but is port 80 by default), but the
Web synchronization and FTP/UNC access for replication
IIS process connects to the backend SQL Server through the
snapshot require additional ports to be opened on the firewall. To
Replication standard ports (1433 for the default instance.
transfer initial data and schema from one location to another,
During Web synchronization using FTP, the FTP transfer is
replication can use FTP (TCP port 21), or sync over HTTP (TCP
between IIS and the SQL Server publisher, not between
port 80) or File Sharing. File sharing uses UDP port 137 and 138,
subscriber and IIS.
and TCP port 139 if it using NetBIOS. File Sharing uses TCP port

445.

If using Visual Studio, on the Visual Studio host computer,

you must also add Devenv.exe to the Exceptions list and

TCP port 135 open TCP port 135.


Transact-SQL
See Special Considerations for Port 135 If using Management Studio, on the Management Studio host
debugger
The IPsec exception might also be required. computer, you must also add ssms.exe to the Exceptions list

and open TCP port 135. For more information, see Configure

the Transact-SQL Debugger.

To open a port in the Windows firewall for TCP access


1. On the Start menu, click Run, type WF.msc, and then click OK.
2. In the Windows Firewall with Advanced Security, in the left pane, right-click Inbound Rules, and then
click New Rule in the action pane (upper right corner).
3. In the Rule Type dialog box, select Port, and then click Next.
4. In the Protocol and Ports dialog box, select TCP. Select Specific local ports, and then type the port number of
the instance of the Database Engine, in my case we are using the default which is 1433. Click Next.
5. In the Action dialog box, select Allow the connection, and then click Next.
6. In the Profile dialog box, I am going to Leave Domain turned on and turn private and public off. Then
click Next.
7. In the Name dialog box, type "Allow SQL 1433 Inbound” and for a description I am putting in the same.
Then click Finish.

 ping (測試網路連線狀態)
ping <targetserverFQDN>

 telnet (遠端登入)
telnet <targetserverFQDN> <MirrorPort>

Note: To end telnet session you must reach the telnet prompt and type quit:
1. Open the telnet prompt by holding down the 'Ctrl' key and push the ']' key. (prompt: Microsoft Telnet>)
2. Type quit.
3. Push the 'Enter' key.