MPagan
MPagan

Reputation: 253

Azure SQL Server firewall not allowing operation to connect even though option is set to yes in firewall settings

I am trying to import my local SQL server database into Azure and I have all the requirements (storage, bacpac file, etc). When I try to import the db, I am getting the error below.

The Azure SQL Server firewall did not allow the operation to connect. To resolve this, please select the "Allow All Azure" checkbox in the Sql Server's configuration blade.

I have already checked yes on the Allow Azure services and resources to access this server option in the firewall settings and added my client IP. Is there something behind the scenes preventing it from allowing access? I am running my SQL server on a Docker container.

Imported bacpac file Local DB Azure Data Studio imported bacpac file

Import Operation Azure Import DB Operation Azure

Import Error Import Error

Firewall Settings Firewall Settings

Upvotes: 9

Views: 1637

Answers (1)

MPagan
MPagan

Reputation: 253

After a week of trial and error, the database imported fine with no problems so I'll answer my question. What is interesting is that I don't have a concrete answer to my question since I don't know exactly why it did, but I'll give two tips anyway.

  1. It might have been the cache on Azure's side. I got in contact with an Azure rep recently and they stated that the cache may have not updated yet. Clearing your cache could be the source of the problem as well. To clear the cache see this document.
    DBCC FLUSHAUTHCACHE;    
    
  2. Creating a new rule that spans from 0.0.0.0 to 255.255.255.255 in your firewall settings.

Feel free to provide more solutions in the answers. Like I said, it was likely the cache on their side. It was really odd that it didn't work for a while, even with the firewall settings configured correctly.

Upvotes: 4

Related Questions