Hi

I installed mssql200. It works fine, but outside application can't communicate with it because it doesn't open port 1433 as it is configured to do. Instead it opens 2 other ports that communicate with the DNS server.

What is required to change in order to open port 1433?

Ronni

Dani AI

Generated

Likely cause here: you are connecting to a named instance that is using a dynamic TCP port, so SQL Server picks a new port at startup and the SQL Browser service (UDP 1434) tells clients where to go. If UDP 1434 is blocked or the Browser service is stopped, remote clients will fail unless you hardcode the port. You can either 1) keep dynamic ports and allow UDP 1434, or 2) pin the instance to a static port (often 1433) and open that port. @nicentral and were on the right track; the missing piece is the role of SQL Browser and UDP 1434. See Microsoft’s guidance on dynamic ports and firewall rules. (learn.microsoft.com)

Before changing anything, verify what port SQL Server is actually listening on. Easiest: check the error log for lines that contain “Server is listening on …”. You can do it from T-SQL too:

EXEC xp_readerrorlog 0, 1, N'Server is listening on';

If you do not see 1433 there, the instance is bound to a different port. Only one instance can use 1433 on a host. If 1433 still does not appear in netstat, either the service is not started, TCP/IP is disabled, the instance is on a non‑default port, or a firewall is blocking it. Restarting the service (as noted) is required after port/protocol changes to rebind the socket. (learn.microsoft.com)

Two practical tips for this thread:

  • If you stick with a static port (1433 or another), open that port on the Windows Firewall or create a program rule for sqlservr.exe. If you keep dynamic ports, ensure UDP 1434 is open and the SQL Browser service is running. (learn.microsoft.com)
  • On SQL Server 2005 Express specifically, remote connections are disabled by default; enable remote connectivity first, then test again. For VB/.NET clients, you can also bypass Browser by specifying the port directly, e.g. Server=tcp:sqlhost,1433;Database=MyDb;.... ()

The “two ports to DNS” you noticed are normal outbound lookups and unrelated to whether SQL Server is listening on 1433.

Recommended Answers

All 10 Replies

Member Avatar for Member #33065

Are you talking about the Windows Firewall?

If so, you need to add an inbound exception to the firewall on the box that has SQL Server installed on it. Also, make sure that your SQL box is not using dynamic ports.

-- Andy

Recently I experienced the same situation. I came across a tutorial at a Java Mag web site that showed port 1864 was the port to use in a connection to a SQL db.

good luck

Hi

I installed mssql200. It works fine, but outside application can't communicate with it because it doesn't open port 1433 as it is configured to do. Instead it opens 2 other ports that communicate with the DNS server.

What is required to change in order to open port 1433?

Ronni

Did you manage to fix this ?

We are having the same problem

First, goto connectionstrings.com and look at the various connections strings.

Yes, I finally got a jdbc (java) connection string to work, and had to configure the java application as a trusted connection with mssql server.

Using java, you will also need to download the mssql jdbc drivers from microsoft and use them in the java connection string as the driver.

Are you using java or vb# ,c#.

You are attempting to connect to a remote server correct

cplmckenzie

We are trying to connect via VB
port 1433 is configured to be open but when we run netstat -an it is not showing as an open port

Hi

I installed mssql200. It works fine, but outside application can't communicate with it because it doesn't open port 1433 as it is configured to do. Instead it opens 2 other ports that communicate with the DNS server.

What is required to change in order to open port 1433?
Pls help me

lalit

For SQLServer 2005, try this: http://support.microsoft.com/kb/914277

For SQLServer 2008, I found settings in the "Sql Server Configuration Manager" tool. Look under the "SQL Server Network Configuration" branch for "Protocols for <SQLEXPRESS>" and change your install to not use dynamic ports (clear out the default "0" entries and add 1433 to the static port fields).

I opened SQL Configuration Manager via Start > All Programs > Windows Server 2008 > Configuration Tools > SQL Configuration Manager. Expand SQL Server Netowrk Configuration > Protocols for MSSQLSERVER. Right click on TCP/IP click on properties. Click on the IP Address tab on Enabled select yes.

Run services.msc. Restart SQL Server (MSSQLSERVER).

Then continue install.

This worked for me.

We are trying to connect via VB
port 1433 is configured to be open but when we run netstat -an it is not showing as an open port

Have you stopped and restarted the instance?
net stop MSSQLSERVER
net stop MSSQL$instancename

In SQL SERVER CONFIGURATION MANAGER -> go to Network Administration Protocols and look on IP ADRESSES!!!
Then, enable the interface, and on the bottom, type "1433" on port, and delete "XXXXX" dynamic port if presetted!

This is the solution.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.