View Dropped IP Addresses in Azure SQL Whitelist - sql

Is there a way to query Azure SQL server logs to see when an IP address was dropped from a whitelist? Thanks!

First enable Auditing on the Azure SQL Database:
Next Create Log Analytics workspace and try to query:
We could not get the IP which failed connecting to the Azure SQL database as of the date.
However,we can get the sum/count of Failed/Successful Connections:

Related

Not able to connect to Azure SQL Server via Dremio

We were not able add Azure SQL Server as external data source in Dremio. We have disabled the firewall to allow all access (at the Azure SQL Server end) to connect to Azure SQL Server, but it was still throwing an error and it was not able to connect from Dremio.
Please let us know if we will need to configure a firewall on route from the Dremio server end to connect to the Azure SQL Server.
Error output:
> Error : Could not connect to intake-dev,
> check your JDBC connection information and credentials.
Note: We have checked that the credentials passed are accurate, and we were able to connect from SSMS using these.
Unfortunately, Dremio does not support Azure SQL Server as a source.
Check this post on dremio community.

Azure SQL Gateways Update

I am fairly new in the database management world and I just received an email from Microsoft Azure warning me that the gateways IP address in my region will change on the 1st of September 2020, which I guess will potentially impact my database.
Therefore I am wondering if I should do something regarding this change knowing that:
My Azure SQL server has a "Default" Connection Policy
I have few IP addresses set in my "Firewall Settings"
I insert data using the SQL connection
I query data using Power BI Azure SQL connector
Best,
Kevin
It means, that if you have applications that connects to the database server via its IP address, or you query (Power BI) the database via its IP address, you will have to update the connection information.
If you access via the hostname of the database, nothing should change.
You need to add the IP addresses of all gateways on your firewall rules, as shown below:
Those are the gateways on my region. Please update with the IP addresses Microsoft sent to you.
"To connect to SQL Database or Azure Synapse, you need to allow network traffic to and from all Gateways for the region.". Source Microsoft documentation here.

Error while creating Azure IR:Check the linked service configuration is correct

Error while creating an Azure IR data factory.
Cannot connect to SQL Database:
'mysqlserversowmya.database.windows.net', Database: 'master', User:
'adminuser'. Check the linked service configuration is correct, and
make sure the SQL Database firewall allows the integration runtime to
access.
Make sure you have open the SQL database firewall: add client ip and Allow Azure services and resources to access this server On portal:
To see: Server-level IP firewall rules
Hope this helps.

Connection string for azure failover groups

I have set up a failover group and have tried to connect using SSMS to <my-failover-group-name>.database.windows.net as the server URL but it times out and does not let me connect.
In each of the sql servers I have allowed my IP address through the firewall. As I understand what they are saying here: https://learn.microsoft.com/en-us/azure/sql-database/sql-database-geo-replication-overview I should be able to use the above as my connection string. I can connect to each of the individual servers in the failover group no problem.
I have also tried connecting to tcp:<my-failover-group-name>.database.windows.net,1433 using the same credentials as I use for the servers in the cluster and I get login failed. What am I doing wrong?
We just ran into the same thing. In SQL Management Studio you need to specify the database name under Options >> Connect to database.
Note the failover involves updating the DNS record so the client connections are redirected to the new primary only after the client DNS cache is refreshed. For more information, click here.

Cannot connect to Azure SQL database, even with whitelisted IP

I am currently unable to connect to my Azure SQL database from a separate remote standalone dedicated box in a private datacenter.
I have an Azure SQL database where I manage the list of IP addresses that can connect to this database. This has worked perfectly until now. I have recently set-up a new dedicated box in a private datacenter that needs to query the Azure SQL database at regular 5 second intervals, give or take.
The problem is, this dedicated box cannot establish a connection to the Azure SQL database, despite being able to connect to other remote FTP servers, MySQL servers, etc. The Azure SQL database does have the IP address of the dedicated box on the allowed connection list. Furthermore, I temporarily opened up a massive range of allowed IP addresses (0.0.0.0 -> 255.255.255.255) on the Azure SQL database to see whether this inability to connect may have resulted from IP blocking.
Does anyone have any suggestions or thoughts on what might be causing this and how I could begin debugging the situation better?
To clarify: I can connect to the Azure SQL database from laptops with individual IP addresses in my office and elsewhere, so long as they have been added to the database whitelist; I can make outward connections to remote FTP and MySQL servers from the dedicated box; I have tried to open-up a massive range of allowed IP addresses on Azure SQL with no luck.
Edit
C:\Users\graphite.rack.ID17157>osql -S v7o06blktw.database.windows.net -U XXXXXXX#v7o06blktw -P XXXXXXX
[SQL Server Native Client 11.0] Named Pipes Provider: Could not open a
connection to SQL Server [53].
[SQL Server Native Client 11.0] Login timeout expired
[SQL Server Native Client 11.0] A network-related or instance-specific error
has occurred while establishing a connection to SQL Server. Server is not
found or not accessible. Check if instance name is correct and if SQL Server
is configured to allow remote connections. For more information see SQL Server
Books Online.
To summarize.
Windows Azure SQL Database (formerly known as SQL Azure) works exclusively and only on TCP port 1433. It only support SQL Server Authentication, TCP connection and TDS protocol as of today.
In order to successfully establish connection to SQL Azure one must fulfil the following requirements:
Create SQL Azure server & Database
Setup SQL Azure Server's firewall rules to accept connections from the IP address of application that will connect to that server
Make sure the box (be it Virtual, or home, or whatever) has no blocking outbound TCP port 1433
Explicitly force encryption in connection string
Explicitly chose to not trust server certificate in connection string
Please note that many (if not all) ISPs (Internet Service Providers) and Hosters, as well as IT staff within companies DO block outgoing TCP Port 1433 due to the SQL Slammer worm. This outgoing port blocking appears to be one of the most faced issues of newcommers to SQL Azure.
UPDATE Nov. 2015
As of August 2015, there is preview feature that enables you to use Azure AD to authenticate to Azure SQL Database. You can read more on this new preview feature here: https://azure.microsoft.com/en-us/documentation/articles/sql-database-aad-authentication/
If you're using corporate network for internet access and facing this problem,
a simple way around this is to use your phone's mobile hotspot for internet access instead.
Be sure to disable your ethernet connection too, which may also be connected to the internet.
Spent hours on this issue. The fix for me was finally found to be my setting on the Xfinity firewall. I had it set to high. Once I changed the setting to low security, I could connect to the Azure sql database with no issues.