Problem statement: – I am writing this article to address similar kind of problem that we faced in our staging environment. On our staging server there was a database named “StagingDatabase” which was a copy of our production database. We made some changes on that database( added few columns in a table) on Friday but when we came back office on Monday , we found that all the changes which were done on Friday are missing from the database. We were surprised how our changes got disappeared from the database. We done same changes on Monday and when we came back office on Tuesday, we found that the changes which we done on Monday are also missing. Somehow we concluded that our database was being restored each day, hence our changes were being overwritten. At that point we required a script that can tell us when last restore was done on the database.
Solution: - Before I write a query to get the details when the last database restore was done, I would like to write a query when last database backup was taken.
4,132 total views, 2 views today