Many questions came to us, about SQL Server Agent for Azure SQL DB. Unfortunately, we don’t have the SQL Agent service in the same way that you have in OnPremise, but we have a multiple solutions for it:
- If you are able to maintain the SQL Agent, you could create a linked server against to Azure SQL Database and you could run any jobs any stored procedure to the SQL Database.
- Using a batch command or powershell, you could run any process, but, in this case you need to implement the business logic in order to manage the issues. You may run this batch command, using a virtual machine on Azure or try to implement any special worker role to implement it, if you need more options.
- You have a solution called Elastic Jobs where you could run any powershell command and apply to any database with similar behavior of SQL Agent.
- SQL SERVER Integration Services could be another solution, because any process could be called against the Azure Database.
- Azure Functions, Common scenarios for Azure Functions Timer-based processing.Azure Functions supports an event based on a timer using CRON job syntax. For example, you could execute code that runs every 15 minutes and cleans up a database table based on custom business logic.
- Finally other possible solution could be use an Azure Runbook.