In on-premises SQL , we have triggers which will run , whenever any SQL data changes .
In Azure SQL , is there any event driven way to capture the data changes in Azure SQL tables
(not polling like Logic app polling azure SQL)
Please help
In on-premises SQL , we have triggers which will run , whenever any SQL data changes .
In Azure SQL , is there any event driven way to capture the data changes in Azure SQL tables
(not polling like Logic app polling azure SQL)
Please help
Would you consider using Temporal Tables? Please read here.
You can also use Azure SQL Database Audit to audit only CRUD operations. See example below using PowerShell:
Set-AzureRmSqlDatabaseAuditing -ResourceGroupName "resourceGroup" -ServerName "SQL Server Name" -DatabaseName "AdventureWorksLT" -StorageAccountName "storageAccount" -AuditActionGroup "SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP", "FAILED_DATABASE_AUTHENTICATION_GROUP", "BATCH_COMPLETED_GROUP" -AuditAction "UPDATE ON database::[AdventureWorksLT] BY [public]" -RetentionInDays 60
Please follow the steps outlined on the following article:
https://sqlrelease.com/convert-existing-table-to-temporal-table
You can have triggers in Azure SQL as well.
So event driven approach, we can use triggers for Azure SQL ?
I was earlier thinking of this below approach , but it requires SQL Agent , which is not available in Azure SQL ( i dont want to SQL Azure Managed Instance, its costly)
Not what I know exactly what you mean with "event-driven approach", but when it comes to triggers there are no differences between on-prem on Azure. Well, you cannot use CLR triggers in Azure, but I assume that you are using regular plain T-SQL triggers.
Agent is not available in Azure, but there are Elastic Jobs which is kind of similar. However, the feature Change Data Capture is not available in Azure SQL Database.
13 people are following this question.