Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
lols
Posting Yak Master
174 Posts |
Posted - 2008-03-25 : 08:00:43
|
| Hi,I want to find which date my database was backed up and how many days ago. I want T-SQL command. Thank you |
|
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2008-03-25 : 08:02:41
|
| Make use of RESTORE HEADERONLYHarsh AthalyeIndia."The IMPOSSIBLE is often UNTRIED" |
 |
|
|
lols
Posting Yak Master
174 Posts |
Posted - 2008-03-25 : 08:20:55
|
| Thanks,Can we query this info using the master.dbo.sysdatabases as I would eventually need to find out backup info of all databases.thanks. |
 |
|
|
PABluesMan
Starting Member
26 Posts |
Posted - 2008-03-25 : 12:39:46
|
| Actually, the backup history is stored in the [backupset], [backupfile], [backupfilegroup], [backupmediafamily] and [backupmediaset] system tables in the [msdb] database. However, the validity of this history is dependent on a number of factors: retention settings in SQL Agent, that sort of thing. |
 |
|
|
|
|
|