How can we help you today? How can we help you today?
way0utwest

Activity overview

Latest activity by way0utwest

There isn't a great solution, and we don't really automate this. I'd do what you listed above, but I'd also think about repeating this. You ought to have a script that fixes these views after a restore. In SQL Clone or RG Clone, we'd link a script to the creation of the test database image, but as a general rule, your process should be scripted as follows: backup ProdA backup ProdB (these can be in parallel) restore TestB (from ProdA backup) restore TestB (from ProdB backup) run CREATE OR ALTER VIEW on TestB to fix all references run CREATE OR ALTER VIEW on TestA to fix all references. If you have the views (or other code) in version control, you can search/replace the code and then run that.  You could use SQL Compare once you've done this once to save a project that looks at your specific views  (or all views) and then writes to a scripts folder. You could then compare this folder on disk to the restored db, but if you added/changed views, this wouldn't work. My long term suggestion is to move to synonyms for each object and have all code reference these. Then when you restore, you still need steps 5/6 above, but you are only changing synonyms, which is less maintenance as multiple views/procs/etc could reference one synonym. / comments
There isn't a great solution, and we don't really automate this.I'd do what you listed above, but I'd also think about repeating this. You ought to have a script that fixes these views after a rest...
0 votes
Share Something at SQL Server Central
We'd love to see some short articles on something you've solved lately at work. We pay, and it's a good way to continue to grow your brand.https://www.sqlservercentral.com/contributions
1 follower 1 comment 0 votes
SQLSaturday Website Reboot
Everyone,Hope you are well. We are looking to reboot the SQLSaturday.com website and have a version available for you to look at and give feedback. The initial site is located at: https://red-gate....
5 followers 6 comments 0 votes