Forum Discussion
Refresh Azure SQL Server from Prod to Test across different subscriptions and regions
PowerShell is an awesome tool to do this with. Azure Function or Azure Automation are suitable code runners for the code (you could use many other things)
You are going to have to write and test your own PowerShell to get this done (or hire someone with knowledge to do it)
Remove-AzSqlDatabase will remove your test and dev databases
New-AzSqlDatabaseCopy will create you a copy of a database within the same subscription but across subscriptions you would need to use SQL authentication and T-SQL
You can then run T-SQL to truncate the tables, update the SLO and add permissions - This is best done with dbatools Invoke-DbaQuery
You could send the email using the code runner (Azure Automation/Functions/GitHub Actions/AzureDevops etc)
I hope that helps,
Rob