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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting Backup Filename from Database 1

Status
Not open for further replies.

pmurch

Programmer
Apr 26, 2012
17
US
Is it possible to determine the backup filename that was used to restore a database? We have a restored database, and there is a question as to which backup file was used for the restore. Is the backup filename kept anywhere in the metadata for the database?

Thanks in advance for your help!
 
Try this:

Code:
Select  * 
from    msdb..restorehistory RH 
        inner join msdb..restorefile R 
		    On rh.restore_history_id = R.restore_history_id

-George
Microsoft SQL Server MVP
My Blogs
SQLCop
twitter
"The great things about standards is that there are so many to choose from." - Fortune Cookie Wisdom
 
Thanks, George -- I believe that is going to work just fine. Never knew about the restorehistory table -- always good to learn something new! Thanks again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top