Share via

Database keeps changing tier, to expensive one. I have applied locks for no delete and readonly

Harj Sohal 0 Reputation points
2026-02-21T09:18:02.79+00:00

My database keeps changing from $5 a month to $300, I've used it for 10 years without issue and its has no load and no active bacth jobs.

After 2 months of excess charges where Azure SQLDBControlPlaneFirstPartyApp service kept increasing database tier to most expensive tier. I deleted the database NeighbourhoodManagerDev_db to stop charges. Deleted on Sat Feb 07 2026 02:46:55 GMT+0000 (Greenwich Mean Time)

but the database was restored by same Azure SQLDBControlPlaneFirstPartyApp service service on Sat Feb 07 2026 20:30:35 GMT+0000 (Greenwich Mean Time)

I've also applied locks to prevent delete and make it readonly, it still deletes the database and increases the tier

Azure SQL Database
{count} votes

2 answers

Sort by: Most helpful
  1. Saraswathi Devadula 14,400 Reputation points Microsoft External Staff Moderator
    2026-02-21T09:43:49.6+00:00

    Hello **Harj Sohal

    **It sounds like you're dealing with a frustrating situation regarding unexpected database tier changes and restoration issues. Here’s what you can try:

    Understanding the Issue: It seems the Azure SQLDBControlPlaneFirstPartyApp service is automatically changing your database tier and restoring it after you've deleted it, even though you've applied locks. This can happen if there are management operations that disregard these locks, especially concerning service tiers and how Azure handles resource scaling.

    Apply Alternative Strategies:

    • Change to Serverless Tier: If your database is inactive most of the time, consider switching to the serverless compute tier. It automatically pauses during inactivity, reducing costs significantly. You can switch this in the Azure Portal under your database's "Compute + storage" settings.
      • Set the Database to Basic or Standard: If you want to keep it from scaling up, you can manually set the tier to Basic or Standard, which will significantly reduce costs.
      Check and Manage Locks:
      - While locks are supposed to prevent deletion, they may not prevent management-level changes such as automatic tier changes related to Azure maintenance. You might want to ensure that your locks are applied at the correct level (resource group or database).
      
    1. Using ARM Templates or CLI: Instead of relying solely on the portal, consider applying your locks using Azure CLI or ARM templates to ensure they are set correctly. The command for adding a lock is:
         az lock create --name PreventDelete --lock-type CanNotDelete --resource-group YourResourceGroup --resource-type Microsoft.Sql/servers/databases --resource-name YourDatabaseName
         
         
      

    Also, I request you to please share the details requested in the private message for further troubleshooting.

    1 person found this answer helpful.

  2. TP 150.6K Reputation points Volunteer Moderator
    2026-02-21T09:47:27.4933333+00:00

    Hi,

    This is typically caused when changes are made via SQL Server Management Studio (SSMS) or T-SQL instead of via Azure portal or Azure CLI/PowerShell/REST API. One case that may be surprising is when you use Entity Framework or other ORM in your application.

    Are you using Entity Framework or other similar technology in your application?

    In order to troubleshoot you can enable auditing on your Azure SQL logical server. Next time it occurs you can view logs and see information about the actual user/date/time/T-SQL that caused the database to be deleted and re-created, instead of SQLDBControlPlaneFirstPartyApp entries you are seeing now. Please reference article below to enable auditing:

    Set up Auditing for Azure SQL Database and Azure Synapse Analytics

    https://learn.microsoft.com/en-us/azure/azure-sql/database/auditing-setup?view=azuresql

    SQLDBControlPlaneFirstPartyApp explained

    https://techcommunity.microsoft.com/blog/azuredbsupport/sqldbcontrolplanefirstpartyapp-explained/4492387

    -TP


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.