A process that is run requires us to have 2 snapshots of data at different points in time to use to compare data. To do this we use Redgate's data compare which works perfectly.
The script I am writing takes the current database, backs it up and restores it (with move) to the previous database, then we have another script that creates the new database. I have then written a script to take the views from the previous database (taken from a restore of current) and scripts them into the current database. I have tested my code that creates the views and that works fine so I think the issue must be with my backup and restore. The script I'm using for this is:
The views do not appear in the previous database which I would expect as that has come from a restore from Current.
Any ideas greatfully received.Many thanks
asked Jun 01, 2011 at 12:13 AM in Default
Can you try this script and see how the FORMAT option works and then see if the backup volume you are creating has more than one backup set in it ?
I think you may be accessing a previous backup of the database...
answered Jun 01, 2011 at 12:33 AM