database refresh scripts
are there any existing scripts that would allow me to automate database refreshes from prod to several non-prod databases on a nightly basis and keep all database names the same? thanks.
Tagged:
Answers
Hi Carmine,
Thank you for your question regarding SQL Clone. I believe the script we have listed in our documentation should be able to achieve a refresh of all the clones linked to an image:
https://documentation.red-gate.com/clone/automation/powershell-worked-examples/refresh-all-clone-databases-to-use-an-updated-image
You would just want to automate a nightly image creation from Prod first, and then use the script on the newly created image.
Looking into the script, it looks like it should keep the same database names for the clones.
In addition, there is also an article on Scripting Custom SQL Server Clones: https://www.red-gate.com/hub/product-learning/sql-provision/scripting-custom-sql-server-clones-for-database-development-and-testing?product=sql-clone
Can you please test these and let us know if it works for your set up.
Kind regards,