January 25, 2012 at 10:05 pm
Hi ,
Can anyone tell me, what is the T-SQL to check whether the backup files exists in a network drive with only previous day date,if there are no files on previous day it should send mail.
Thanks.
January 26, 2012 at 8:12 am
I think you are looking for the undocumented xp_fileexist procedure. Here's a an article[/url] on it.
In this day and age, I'd recommend looking into a PowerShell solution for it, as it will be documented and supported, while xp_fileexist can change or be removed without notification. Here's a link that has an example. I don't know if it is the best way to do it in PowerShell. You can also use SMTP straight from PS if you want.
EDIT: added link to PS Example
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply