How to force SQL Server to use port 445? | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

How to force SQL Server to use port 445?

I want to know how to make SQL Server, which is using Named Pipes, to use port 445 instead of 139. 1. What ports (e.g. 1433, 1434, 135, 137, 138, 139) besides 445 must be open?
2. What network libraries must be enabled besides Named Pipes in both client and server?
Thank you for any help.
To use specific port for SQL server using SERVER NETWORK UTILITY specify the port name for TCP/IP connections to use that port. If you set SQL Server to listen on TCP/IP, type the TCP/IP port number in the Port number box. This is the port that SQL Server listens on when accepting connections from TCP/IP Sockets clients. The default is 1433, the official Internet Assigned Number Authority (IANA) socket number for SQL Server. Named-pipes are the default netlibs enabled while installing SQL server, you can choose TCP/IP or multi-protocol depending upon the requirement. If you use the TCP/IP Net-Library, enable port 1433 on the firewall. Use the Hosts file or an advanced connection string for host name resolution. If you use named pipes over TCP/IP, enable port 139 for NetBIOS functions.
Microsoft does not recommend that you enable UDP ports 137 and 138 for NetBIOS name resolution by using B-node broadcasts. Instead, you can use a WINS server or an Lmhosts file for name resolution. By default, SQL Server uses TCP (not UDP) port 1433 to listen on TCP/IP. To change the port, run SQL Server Setup on the server and then click Change Network Support. If SQL Server uses port 1433, the client Net-Library works. If SQL Server uses a custom port number, the client must specify that port in the Data Source Name (DSN).
SMS RAS http://www.microsoft.com/windows2000/techinfo/reskit/samplechapters/cnfc/cnfc_por_simw.asp Satya SKJ
Moderator
http://www.SQL-Server-Performance.Com/forum
This posting is provided “AS IS” with no rights for the sake of knowledge sharing.
Configure the server to use TCP/IP in the server network utility on your start menu. You can then configure the tcp/ip port.

The use of port 139 or 445 is operating system related. Windows 2000 clients and up will try and use port 445 but can also use 139 etc if no response is given on 445. Windows NT and below will always use 139 etc. If your server is Windows NT it can not use 445 for named pipes. If it’s Windows 2000 or higher it can answer on both 445 and 139 etc. The only time you can use 445 only is when your server is Windows 2000 or higher and all your clients are too.
Hi Argyle, I’m trying to figure out why my SQL Servers which are listening on Named Pipes (Windows 2000 and Windows XP) are not using port 445 when the clients are Windows 2000 and Windows XP. So far, I can find port 139 being used. According to MS Webcast (SQL Server and XP SP2), only port 445 is needed for Named Pipes.

The client desides which port to use. The server will keep listening 139 as well since it has to support older clients like windows NT. Have you tried blocking 139 and only allowing 445 and then tested to connect with a windows 2000 client?
Hi Argyle, I have tried the following: 1. In the Windows Firewall of XP SP2 RC2, I marked the File and Printer Sharing but only marked port 445 only. So, port 139 is not marked. 2. In the WINS tab of Advanced TCP/IP Settings, Disable NetBIOS over TCP/IP. 3. Running Net Config Server shows that NetbiosSmb is active. 4. The value entry TransportBindName of HKEY_LOCAL_MACHINESYSTEMControlSet001ServicesNetBTParameters has the value Device. In both #1 and #2, I cannot register the server in the client’s EM.
]]>