Solved

backup set id not same in backupset and restorehistory

Posted on 2012-03-29
7
324 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 
LVL 69

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 69

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
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 
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: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 69

Accepted Solution

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

[Webinar] Learn How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
How to leverage one TLS certificate to encrypt Microsoft SQL traffic and Remote Desktop Services, versus creating multiple tickets for the same server.
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…

734 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