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.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Backup

Author  Topic 

ratheeshknair
Posting Yak Master

129 Posts

Posted - 2007-10-26 : 09:41:24
Hi All
Is there any TSQL to find whether the backup is present there in the disk or not.

Thanks in Advance

RKNAIR

Zoroaster
Aged Yak Warrior

702 Posts

Posted - 2007-10-26 : 10:31:50
USE MSDB
SELECT * FROM BACKUPMEDIAFAMILY



Future guru in the making.
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2007-10-26 : 13:13:43
This link has queries for backups that have been made (in some more details than Zoroaster's example):

http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=55210&SearchTerms=RESTORE%20syntax%20/%20example

other than that you would have to use xp_cmdshell to do a DIR on the file, or use xp_fileexist (undocumented)

Kristen
Go to Top of Page
   

- Advertisement -