When you delete Azure SQL Database, Portal might return error with “The database xxx on server xxxx is used by job account xxxx. Database cannot be deleted or renamed while associated with job account;”.
Just like the error message mentioned, the database cannot be deleted or renamed while associated with job account. So you should search the job account name in your Azure Portal and delete the ELastic Job agent first. Then you can delete the database now.
NOTES: PLEASE MAKE SURE THAT THE JOB AGENT IS NOT NEEDED.
In SQL Server, we have SQL Server Agent which provide the feature of scheduled tasks,aka jobs.
To provide similar feature in Azure SQL Database, Microsoft developped Elastic Jobs, which provide job scheduling services that execute custom jobs on one or many databases in Azure SQL Database or Azure SQL Database elastic pools.
文档信息
- 本文作者:Robin Chen
- 本文链接:https://crushonme.github.io/2025/05/30/Failed-To-Delete-Azure-SQL-Database/
- 版权声明:自由转载-非商用-非衍生-保持署名(创意共享4.0许可证)
Document Information
- Author :Robin Chen
- Link : https://crushonme.github.io/2025/05/30/Failed-To-Delete-Azure-SQL-Database/
- Copyright:Attribution-NonCommercial-NoDerivatives-No additional restrictions(CC BY-NC-ND 4.0)
Related Issues not found
Please contact @crushonme to initialize the comment