Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

backup set id not same in backupset and restorehistory

Posted on 2012-03-29
7
Medium Priority
?
349 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 70

Expert Comment

by:Scott Pletcher
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 70

Expert Comment

by:Scott Pletcher
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
Fill in the form and get your FREE NFR key NOW!

Veeam is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

 
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 70

Expert Comment

by:Scott Pletcher
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 70

Accepted Solution

by:
Scott Pletcher earned 2000 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Long way back, we had to take help from third party tools in order to encrypt and decrypt data.  Gradually Microsoft understood the need for this feature and started to implement it by building functionality into SQL Server. Finally, with SQL 2008, …
In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…

783 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