What port is a remote SQL Server 2005 running on? - sql-server

How do I find what port is my remote SQL Server 2005 running on?

Unless it's modified, it's the default port 1433.

SQL Server's default port is 1433. If you are unable to connect, you may have to make sure your firewall settings are correct.
Alternatively you can find out which port SQL Server is running by opening your command prompt: (Start > Run > CMD). Type "netstat" and hit enter, this will show you what you're looking for.
You could also check SQL Server's Error Log on the remote server to determine the port. Here are some more intracate ways of determining the port.
Additional information about ports right here on SO.

Related

What port does Microsoft SQL Server Management Studio use for database connections?

I am using Microsoft SQL Server Management Studio 17 to connect to a remote Microsoft SQL Server database. Looking at the connection dialog of Studio 17, I don't see any port number setting. Google tells me that Studio uses port 1433 by default.
I tried to use telnet to check if port 1433 is listening on the remote server: telnet example.company.com 1433
However, the connection failed. How can I find the port used for this database connection?
You could connect SSMS to your DB, run ProcessExplorer and examine the properties of ssms.exe. On the "TCP/IP" tab you possibly find what you are asking for:
Make sure you have connectivity to the server first. Since you mentioned "remote" there could be a firewall in the way, so your solution is going to depend on your network topology.
Can you ping the server? If ping works, I would reach out to the owner of the server and verify the DB connection parameters. Maybe your IP needs to be whitelisted. Etc. Etc.
Check if the server host has inbound port 1433 enabled, and whether TCP/IP is enabled using the SQL server configuration manager. If the SQL server instance in question sits on the cloud, you might want to check the specific provider's firewall rules on the container and adjust to permit 1433 inbound connections. The port setting entirely lies on where the actual SQL server instance sits. The management studio in your remote client will not be using any port.

SQL Server port forwarding

I forwarded port 1433 to 9082 on my server, at firewall set to allow for inbound and outbound, at SQL Server Allow Remote is ON.
But, I can't connect to my SQL Server from client.
I installed SQL Server 2012.
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 25 - Connection string is not valid)
Solution to problems connecting to MS SQL server with Microsoft SQL Server Management Studio if your port is forwarded
I had problem with this as well. It's been bugging me for days now. Finally I stumbled on solution on this page so I'll exclude it as screenshot:
It's not : like in all other systems, you have to put ,
First off check in the ERRORLOG the port used by SQL Server (there is no guarantee it will always listen on 1433, or if TCP is enabled at all).
In the ERRORLOG, at startup, you will find a line like this one:
In my case the port is indeed 1433 but yours may be different. If needed, you can change it using the SQL Server Configuration Manager.
Secondly, if you are forwarding a port to a different one (like your example from 1433 to 9082) you are in fact disabling the SQL Server Browser. This happens because SQL Server Browser does not know of your port forward so it will tell the clients to connect to 1433 (supposing you are allowing UDP 1434 otherwise you won't be able to reach SQL Server Browser at all).
You can connect to a SQL Instance without using the SQL Server Browser though, all you need is to specify the port in the connection string (without the instance name, if any).
For example, if your instance is called MYSERVER/INST your connection string will be something like:
User ID=*****;Password=*****;server=tcp:MYSERVER,9082
Also make sure to configure your SPNs manually otherwise Kerberos won't work.
You can find more details on how to compose the right connection string here: SqlConnection.ConnectionString Property.
try config your router first. after all connect. Btw, already enable TCP/IP #sql yet or not?make sure open port for sql.
check on sql configuration enable or not for open connection
check firewall open or not
check router open or not
check connection lag or not(if network). local no need
make sure sql browser and agent run(for xp if not xp just enable sql browser)
if not all there maybe you wrong installation. if for network work install local/system. not network(this for attach #server cluster)

SQL Server 2014 Express Client Not Connecting

This is a new SQL Server 2014 Express installation.
The application using the SQL Server, installed on the server works, no problem connecting.
But when a client PC (on the LAN) tries to use the application, the "canned" SQL Server message says that "server does not exist or connection denied".
I think that the SQL Server is not listening on port 1433 but can't figure out why not. Here is what I tried:
Server Connection property has the box "Allow remove connections to this computer is checked"
SQL Server Browser is running.
SQL Server Configuration Manager -> Client Protocols -> TCP/IP: Port 1433 is enabled. (this one looks different from the SQL Server 2008 though where in SQL Server 2008 there were ports, IP1, IP2, and so one where port 1433 was set Active)
SQL Server Management Studio set to use Window and SQL Server Authentication.
When I run NETSTAT -a on the server, I DO NOT see the line (which I think it should) like this:
TCP ###.##.##.###:1433 ESTABLISHED.
So I am concerned that the 5 above is not showing what I am looking for. What else can I try?
Make sure the Option for remote Connections is enabled.
Right-Click on your Server, choose Properties, Connections an dcheck the box allow remote connctions.
Equally important!
Make sure your Firewall allows the traffic through the Chosen Port. Also, make sure you have the rules defined in Windows Firewall or turn off Windows Firewall altogether.
In the SQL Server Configuration Manager, when right mouse clicking on TCP/IP (in Protocols for MSSQLSERVER) there are two tabs. The second tab, at the button of the list there is IPALL which was empty. Once I entered 1433 there, the SQL Server started listening on this port. Problem Solved.

Connecting to SQL Server 2000 through TCP/IP on localhost failed

I have tried to connect to SQL Server 2000 through TCP/IP.
I followed these steps and enabled SQL Server 2000 on port 1433.
Then I used the command to test whether the port is opened up:
telnet localhost 1433
But I found the following error:
Connecting To localhost...Could not open connection to the host, on port 1433:
Connect failed
And I also failed to connect to the server by following these steps.
How to solve this problem and connect to Sql Server 2000 through TCP/IP?
See my configs
By default TCP-IP is disabled.
You need run SQL Server Configuration Manager->SQL Server Network Configuration and enable the protocol, then restart SQL Server service
Try disable your firewall temporarily and see if it makes a difference, to isolate the problem.
EDIT: Wait, did you enable TCP/IP on the client or server ? If you only enabled it on the client, then that explains it.
It must be enabled on both to allow communication. From your error, it looks like the server does not accept TCP connections. I don't remember what SQL 2000 calls the program, but find something like "SQL Server Network Configuration", not "Client Configuration". And turn on TCP there.
Perhaps show us a screenshot of your network configuration dialog.
I did following actions to remove this bug
1)Disable Other Protocols other than TCP/IP from SQL Server Client And Server Utilities
2)Re-Instal SQL Server 2000 sp4
I think you need to be running SQL Server Agent to connect via TCP/IP on 2000.
This behavior is by design:
http://support.microsoft.com/kb/929152
Use an alternative representation of the name of the local host address instead of "localhost". Possible alternative representations include the following:
127.0.0.1
"."
The actual local host name
Installed SQL Server 2000 SP4 and it solved the problem for me.

sql 2008 express connection problems

I've just installed a fresh copy of SQL 2008 Express. before I did anything I opened Management Studio and successfully connected using Window Authentication.
However I tried to run the following on the command line
"telnet localhost 1433" and got the error "Could not open connection to the host, on port 1433: Connect failed"
I checked netstat and there is nothing listening on port 1433.
Before I go any further, is there a problem with the install?
thanks,
Shane
did you check if the tcp/ip protocol is enabled? It's disabled by default if I remember correctly.
are you telling your SQL Server to listen on TCP/IP
http://blogs.msdn.com/sqlexpress/archive/2005/05/05/415084.aspx
The port number isn't guaranteed to be 1433.
In Sql Server Configuration Manager, make sure:
(1) SQL Server is running
(2) SQL Server Browser is running.
(3) In the Protocols for SQLEXPRESS that TCP/IP is on. You can check the port inside there.
Alternately get the port by finding the PID of sqlservr.exe in Task Manager and then typing:
netstat -ano | findstr PID
Prior to these steps I couldn't connect via 127.0.0.1 myself, now I can connect even from a remote machine on my LAN. (Note: for LAN access you'll need to add firewall exceptions for sqlservr.exe and sqlbrowser.exe)

Resources