Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL Server 2000/2005 'last backup time'

Status
Not open for further replies.

JScannell

Programmer
Joined
Jan 9, 2001
Messages
306
Location
US
The last time a db was backed up is stored in the msdb database (backupset table). If I do a restore of a db from a .bak file that comes from somewhere else, it appears that that db's last backup date doesn't come in as a result of the restore. Is that true? If so, then is there a way to retrieve that .bak's last backup date?

Thanks in advance,

Jerry Scannell
 
Thanks for the link, but that doesn't answer the question.

After doing the restore of the .bak file, should the msdb.dbo.backupset table get updated? the reason for asking is if I right click on the restored DB and goto properties, the last backup date that is displayed corresponds to the last time the previous db was backed up, and not the file I just restored from. In fact, in my case (and the reason that I suspect something isn't right) is that the last backup date is more recent than the timestamp of the .bak file!

Jerry Scannell
 
To answer your question. No. You did a restore, not a backup. The backup values are stored in MSDB not in the specific databases. As far as that instance of SQL Server is concerned, the restored database is a brand new database and has never been backed up.

-SQLBill

The following is part of my signature block and is only intended to be informational.
Posting advice: FAQ481-4875
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top