Solved

backup set id not same in backupset and restorehistory

Posted on 2012-03-29
7
307 Views
Last Modified: 2012-04-03
when I do a backup from the server and do a restore as another db name, i do not see the backupset ids matching between the above 2 views.. how then can we verify that the right version of backup was used for the restore?
0
Comment
Question by:25112
  • 4
  • 3
7 Comments
 
LVL 69

Expert Comment

by:ScottPletcher
ID: 37783501
It is your responsibility to make sure you used the correct backup to do a restore.  

[When you do a restore, SQL doesn't attempt to identify in the system tables which backup is being restored based on the original backupset id (as you've discovered).]

You can include a description in your backups, and generate a unique description for every backup.  That would give you another way to verify that you're getting the backup you want.
0
 
LVL 5

Author Comment

by:25112
ID: 37783538
OK- thanks for confirming..

but i do not see any description field in restorehistory?
0
 
LVL 69

Expert Comment

by:ScottPletcher
ID: 37783592
You can add a description to the *backups*.  You can then check that description before deciding which backup to restore.

Keep in mind, you can restore a backup that was not made on that server or that was deleted from the msdb history long ago.  So SQL really can't match up the restore with a specific backup in some cases.

[I guess they could add a uniqueidentifier value to a backup and match on that during restore, but they chose not to.]
0
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 
LVL 5

Author Comment

by:25112
ID: 37785213
actually the tape backup team has to do the restore.. since we don't do it, there is no way to easily confirm that they did the right job.. that is the reason i was exploring this..
0
 
LVL 69

Expert Comment

by:ScottPletcher
ID: 37787256
Hmm.  You could create a dummy table with a datetime that is autoupdated every (n[n]) hour(s), but has no other updates.  Then, upon restore, you could look in the row(s) in that table to determine what time range the backup that was restored was made in.
0
 
LVL 69

Accepted Solution

by:
ScottPletcher earned 500 total points
ID: 37787263
For example, say you updated the row every hour with the new datetime.

You wanted a restore from 5PM but the table shows 2PM.

You know they restored a backup from before 5PM.
0
 
LVL 5

Author Comment

by:25112
ID: 37801906
helped.. thanks Scott.
0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How to leverage one TLS certificate to encrypt Microsoft SQL traffic and Remote Desktop Services, versus creating multiple tickets for the same server.
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now