Can't Connect to Azure Server from SQL Server - sql-server

I can't connect SQL Server to Azure. When I try to connect I get this error:
How can I solve this?
Connect to Server
Cannot connect to mukdo.database.windows.net.
ADDITIONAL INFORMATION:
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: TCP Provider, error: 0 - A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.) (Microsoft SQL Server, Error: 10060)
A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond

Make sure your IP is added in the firewall setting in Azure SQL. You can use 'Add client IP', if it's not added.enter image description here

My problem Solved After Change My Internet Connection

Related

ADF Copy Actitity issue

I have an issue where I can preview data from a source, a SQL Server connected through a Self-Hosted IR, but I cannot copy the data to a sink (Azure SQL DB on an EP).
The user account at the SQL Server level has access to the relevant tables, as can be verified by the fact that I can preview data. The sink side dataset also works, as I can use with similar data sources to the source.
If I, for example, try to fetch two specific rows, I can see them in the preview, but it takes 5 minutes for ADF to give an error message which is wildly misleading:
ErrorCode=SqlFailedToConnect,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=Cannot connect to SQL Database: 'ServerName.database.windows.net', Database: 'DatabaseName', User: 'AdminUserName'. Check the linked service configuration is correct, and make sure the SQL Database firewall allows the integration runtime to access.,Source=Microsoft.DataTransfer.ClientLibrary,''Type=System.Data.SqlClient.SqlException,Message=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: TCP Provider, error: 0 - A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.),Source=.Net SqlClient Data Provider,SqlErrorNumber=10060,Class=20,ErrorCode=-2146232060,State=0,Errors=[{Class=20,Number=10060,State=0,Message=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: TCP Provider, error: 0 - A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.),},],''Type=System.ComponentModel.Win32Exception,Message=A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond,Source=,'
What am I doing wrong? Is there some setting I am missing?
Please check whether the Azure SQL DB(sink) is accessible from the server on which you have installed the self hosted IR.
YOu would need to whitelist the IP of the Self IR server in Azure SQL DB firewall rules and make some port opening in the IR server for Auzre SQL DB to be accessible.
Basically in case if an IR is being used in a copy activity, both the source and sink must be accessible from the server on which IR is set up

Connection to Azure Managed server fails from .NET app but works when connection from the command line

I am trying to connect from an Azure virtual server (windows 10) to an Azure Managed SQL instance.
From the command line on the virtual server I can connect to the managed SQL instance using:
sqlcmd -S aserver-data01.public.abc123.database.windows.net,3342 -U User01 -P password
This connects fine.
I am running a compiled .NET executable on the same virtual server that attempts to connect to the managed SQL server using the following connection string:
DataBaseConnectionString, Data Source=aserver-data01.public.abc123.database.windows.net,3342; Database=MyDB; Integrated Security=false; User ID=User01; Password=password
It fails with:
System.Data.SqlClient.SqlException (0x80131904): 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: TCP Provider, error: 0 - A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.) ---> System.ComponentModel.Win32Exception (0x80004005): A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond
Can anyone help, I can't seem to get it to connect.
The problem was the .net executable was pulling the connection string from a comma separated config file and so was splitting the connection string in half at the comma before the port number.

SQL Server 2008 R2 remote connection error

I am getting an error while trying to connect to SQL Server with public IP.
I tried many things Adding port 1433in firewall but still it is showing the below error.
TITLE: Connect to Server
Cannot connect to XXX.xxx.xx.xx ,1433.
ADDITIONAL INFORMATION:
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: TCP Provider, error: 0 - No connection could be made because the target machine actively refused it.) (Microsoft SQL Server, Error: 10061)
No connection could be made because the target machine actively refused it

SSRS not connecting to Azure SQL

We have our SSRS servers, on-premise. When trying to connect to the Azure SQL DB, it is throwing the following error when not using the port number 1433:
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: Named
Pipes Provider, error: 40 - Could not open a connection to SQL Server)
When using the port 1433, the same error is coming only instead of Named Pipes it says TCP.
What to do? I have already added the SSRS IP to the Azure SQL DB firewall and have checked the connection string is also perfect. Since Auidting is on, we are also using 'secure' in the connection URL of the 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

In my remote server I log in SQL Server with SQL Server Management Studio. It works.
But on my PC when I try to log in I get an error. I add port to server name but I still get the same error. My TCP/IP is enabled. Port is enabled
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: TCP Provider, error: 0 - A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.) (.Net SqlClient Data Provider)

Resources