Can't connect to a SQL Server database using a specific network - sql

I'm working from a new place and I'm unable to connect to a remote database using the wi-fi, but it works if I route my mobile 4g as a hotspot.
I've contacted the internet provider and they say there's nothing blocking the access. And it seems true because it allows me to connect to the VPN and I can access the remote desktop where the database is hosted and in there I'm able to connect to the database using SSMS without any errors, but when I try to connect directly from my PC I get the following error.
Any idea what could be causing this or how can I investigate where the problem is?
I'm using SSMS v18.9.1, windows authentication and connecting using the server name like "srv123.xxxx.com\instprd". This configuration works when I use the 4g hotspot instead of the wi-fi.

Tried what I could and then I talked to the ISP support and it was indeed that some ports were blocked.
Some update on the router (tp link AC1200) firmware caused it so they had to downgrade it and that solved the problem.

Related

SQL Connection: Server Not Found or Access Denied when Connecting from Client PC

I'm having an issue with an SQL database connection from client pc to the server pc. FYI, I am not an SQL-wiz.
I'm using a cashier program called (الأمين), and there is not enough support for this problem. When I try to connect to the main server through the client pc, I receive the following error:
[DBNETLIB] [ConnectionOpen (Connect().]SQL Server does not exist or access denied
I already tried the following fixes:
Windows firewall inbound and outbound rules for ports 1433 and 1434.
Client Utility Management, I enabled the TCP/IP and kept the named pipes disabled. I added the appropriate server name and I added the IP of the server as alias. (This is on the Client PC)
I enabled the TCP/IP on the SQL server configuration and added 1433 under IPAll and IP1.
I made sure that the password and user names being logged in with were correct from the client pc.
I made sure "Allow Remote Connection" was turned on in the server settings.
I could've also tried some more fixes already but can't recall them right now.
Please, any help would be appreciated. I just need the client PC to connect to the server PC. The problem could be from the cashier program itself, but it works for other users of the same software. There isn't enough support for the program so I have to fix it myself. I am convinced there is a simple solution that I just don't see.
Thank you plenty in advance!
I am using version 18.8 SQL Server Management Studio, and am on windows 10.
I figured it out!
The problem was with the login of SQL.
I logged in using "sa" the user made with the SQL creation and it works now.
Thank you!

How can I identify what is blocking port 1433?

I like to consider myself a fairly smart individual with the superb ability to "Google" things. However, I am running into an issue that is driving me insane.
I am trying to connect to a Microsoft Azure SQL Server from my Alienware Laptop running Windows 10, over 5Ghz WiFi. It seems that something is blocking port 1433 (according to many Google results). Unfortunately, I have opened this port on my Nighthawk router, through Windows' Firewall (wf.msc) via inbound rule, and finally I have enabled port 1433 in Bitdefender for all applications. I still cannot connect to the SQL instance through SSMS (even tried DBeaver). I am getting TCP rejection messages "forcibly closed by remote host"
Here is the kicker. I can access my database on the same device through a vb.net application (though I believe this is a different port). The bottom line is, I know the credentials, I am the admin, but I cannot get port 1433 truly open.
What other steps can I try to remedy this situation? Any and all help will be appropriately credited.
You should open the port 1433 for outbound traffic from your local network instead of the inbound, also make sure you have added your client public IP address in your Azure SQL server firewall via the Azure Portal.
The full troubleshooting steps as below:
Ensure you have the appropriate ports open outbound from your local network or connection (typically port 1433)
Create a server-level firewall rule for your SQL database using the Azure portal.
Ensure you are using the correct server name and username for SSMS, the server name should be something like this: mynewserver20170313.database.windows.net.
Ensure you are using SQL Server Authentication
For SSMS the username format is username#servername
Ref: Use SQL Server Management Studio to connect and query data

mysql command line client says can't connect to Azure Database for Mysql

I was happily using mysql command line in my mac to connect Azure Database for MySql. But all of sudden it started throwing an error saying:
ERROR 2003 (HY000): Can't connect to MySQL server on 'XXXXXXXX.mysql.database.azure.com' (61)
I can see the the database instances is running alright, as I'm able to use the database from an application that is running in Azure.
Has anyone else experienced this?
This problem occurred because the particular network i was connected to not allowing any such connections. Later when i tried from my usual network ( home / office )it got connected. I haven't made any changes in my Azure Db for MySql nor in my local machine, this proves that problem was with that particular network.
It sounds like firewall rules were not setup for that specific network. Can you confirm by looking at this doc?
https://learn.microsoft.com/en-us/azure/mysql/concepts-firewall-rules
Basically, you can click "Add my IP" which would add your current network's Client IP. However, if the network you are on SNAT's out with multiple IP's, you would need to add the entire range from your networking team.
Thanks.
James

Why can I connect to PostgreSQL server with PgAdmin from outside network, but not within it?

I have a PostgreSQL server set up on Ubuntu on a computer connected to my home WiFi. I also have a Windows machine with pgAdmin set up to connect to this server. However, I found that the windows machine is only able to connect to the PostgreSQL server when it's on a different network from my home wifi. When I try to connect to the server from the same wifi network, I get "server doesn't listen." Why does this happen, and how can I fix it?

User can't connect to a SQL Server

I have an WinForms app in the enterprise, which makes a connection to a SQL Server 2008 box. A lone user can't seem to make a connection. He brings his laptop and plugs it into the network. The laptop is not joined to the domain, but the connection to the SQL Server is not through Windows authentication.
I can ping the SQL Server from his laptop. I tried creating a UDL file and connecting and that does not work either. The error:
Test connection failed because of an error in initializing provider.
[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or
access denied.
Here are facts:
The user can connect to any other SQL Server on the network.
No other user (on the domain or not) has this issue.
I had the user VPN into the network, with same results.
I tried connecting my personal laptop (not on the domain, but attached to the office network) and was able to connect with no problems.
I VPNed from home into the network and was able to connect with no issues.
What else can I do to troubleshoot the connectivity issue?
I got the same issue. Tried to check network connection, port, firewall, etc but no use.
Finally, I realized the top order of Default Document was not default.aspx. After I changed the it on the top, it worked.