Azure SQL Serverless tier never shuts down

2020-06-18 10:09发布

问题:

I'm experimenting with the Serverless tier in Azure SQL, but the database never "sleeps" because it seems that Azure is continually querying the database behind the scenes. I created the database via and ARM template.

The "Compute utilisation" and "App CPU Billed" charts on the database overview show that the database is being hit regularly (even though I am not making any queries myself). The Top queries in "Query Performance Insight" are:

(@ip_address_value bigint,@start_ip varchar(45))SELECT top 1 @start_ip = start_ip_address_value FROM sys.database_firewall_rules_table WHERE @ip_address_value BETWEEN start_ip_address_value AND end_ip_address_value OPTION (MAXDOP 1)

and

(@ip_address_value bigint,@start_ip varchar(45))SELECT top 1 @start_ip = start_ip_address_value FROM sys.database_firewall_rules_table WHERE @ip_address_value BETWEEN start_ip_address_value AND end_ip_address_value AND start_ip_address_value > 0 OPTION (MAXDOP 1)

Which seem to be from the firewall. Do I have to disable the firewall or delete all the rules to allow the database to "sleep"?

回答1:

I would like to post my case here, my app was not calling the database and I still seeing those calls as well, I figured out that it was the database backup. I could see the queries in: Azure >> YourDatabase >> Left Menu, search for Query Performance Insights >> You will see the calls that was done to your database.

Image showing the Menu and database query