This is an automated archive made by the Lemmit Bot.
The original was posted on /r/azure by /u/apdunshiz on 2023-09-15 21:43:23.
I have an Azure Database named db on database server servera that I am able to copy to database server serverb in Azure, automatically with a Function app. The app then renames the original database, appending "_old" to it, and then renames the copied database to the original db.
Basically, my function app is restoring a database for me.
However, I have a group on serverb that has read-only access to the original db but not the renamed one. How can I automate this group to also have access to the newly copied database?
I am not an SQL expert but know a little. Can I create a schema or something to say that the group always has access to this database?
I am trying to use Azure Functions to do it with PowerShell but after spending countless hours on it (including non-work hours), I am about to give up with that approach.
Any advice is appreciated!
Thanks!