Michele La Ferla
Michele La Ferla

Reputation: 6884

Inconsistent Connection with Azure SQL Server

I am using PHP to connect to my SQL Server which is hosted on a database in Azure. I have a form which gathers the data being entered from users into the database. My problem is that the data entry is inconsistent.

Scenario 1: On the PC where all development was made, the data entry is always working, no matter how many entries I make. I can see all the entries I made on the backend.

Scenario 2: On my friend's PC, data entry was ok initially, however after a couple of tests, it seems that his PC was blocked from entering more entries.

Scenario 3: On a third PC, data entry is only working sometimes. For some entries we managed to enter data, then it stops receiving data for a small period of time, and then accepts further entries.

Can anyone please shed a light on the issue? Is it a known issue in the pdo-sql driver which Microsoft have for PHP and if yes is there a way around it? Is it an Azure security feature and if so how can I disable it? Is there something I am missing?

Thanks a million for all your help!

Upvotes: 0

Views: 90

Answers (1)

xupiter2012
xupiter2012

Reputation: 36

Did you specify a range of IP addresses that can access your database?

To add trusted IPs, see "Create a server-level firewall rule" section at: https://learn.microsoft.com/en-us/azure/sql-database/sql-database-get-started-portal

To help protect your data, Azure prevents access to your server until you specify which computers have permission. For more details, see docs at: https://learn.microsoft.com/en-us/azure/sql-database/sql-database-firewall-configure

Upvotes: 1

Related Questions