Solved

backup set id not same in backupset and restorehistory

Posted on 2012-03-29
7
331 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
Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

 
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

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

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

There have been several questions about Large Transaction Log Files in SQL Server 2008, and how to get rid of them when disk space has become critical. This article will explain how to disable full recovery and implement simple recovery that carries…
Naughty Me. While I was changing the database name from DB1 to DB_PROD1 (yep it's not real database name ^v^), I changed the database name and notified my application fellows that I did it. They turn on the application, and everything is working. A …
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …

615 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