New to Azure and app services. If I create a deployment slot for testing, is there a way to create a "slot" for a testing/staging db as well? So that if I change data in the testing/staging slot it only changes the data in the testing/staging db and not in the production db?
Asked
Active
Viewed 684 times
1 Answers
0
There is no testing/staging db slot, however you could create two databases, one is pro db and one is staging db.
Also if you want to swap the staging web and keep all staging slot settings and connection strings stick to a slot. You could set Slot setting
to make them become sticky to the slot
. Further more use of the slot setting you could refer to this tutorial:Database connection string when swapping between App Servers slots.

George Chen
- 13,703
- 2
- 11
- 26
-
ok, so if I create two databases, I want the second to be a copy of the first with all the schema and data as the first. And to be copied over, say, daily at 4AM. So that when I wake up I have this second database with all prod data so I can test on it. How would I do this? – chuckd Jul 24 '19 at 03:15
-
Azure provides some ways to copy sql database, you could refer to [this link](https://learn.microsoft.com/en-us/azure/sql-database/sql-database-copy). Maybe you could use the powershell way with a scheduled job. About how to create scheduled job you could refer to [this blog](https://devblogs.microsoft.com/scripting/create-a-powershell-scheduled-job/). – George Chen Jul 24 '19 at 05:48
-
Hi George. Thanks, but is this the suggested/best practice for creating and using a test db in Azure? Just curious. It seems like there would be more documentation for this – chuckd Jul 25 '19 at 04:08