SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Need a Query
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

vinay_555
Starting Member

India
10 Posts

Posted - 12/03/2013 :  08:13:45  Show Profile  Reply with Quote
Hi guys,


I need a SQL query which lists out directory path from which the database has been restored recently ( i.e backup path ).....


Regards,
Vinay.

MIK_2008
Flowing Fount of Yak Knowledge

Pakistan
1054 Posts

Posted - 12/03/2013 :  09:38:57  Show Profile  Reply with Quote


SELECT
A.[destination_database_name],
A.[restore_date],
C.[physical_device_name]
FROM msdb.[dbo].[restorehistory] A
JOIN msdb.[dbo].[backupset] B ON A.[backup_set_id] = B.[backup_set_id]
JOIN msdb.[dbo].[backupmediafamily] C ON B.[media_set_id] = C.[media_set_id]
WHERE destination_database_name = 'Halsoos_Restore'
ORDER BY A.[restore_date] DESC

Cheers
MIK
Go to Top of Page

vinay_555
Starting Member

India
10 Posts

Posted - 12/04/2013 :  04:59:13  Show Profile  Reply with Quote
Thanks MIK...
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.08 seconds. Powered By: Snitz Forums 2000