May 22, 2003 at 11:12 am
Is it possible to use xp_cmdshell and check a directory size, if it is less than 2GB to send a notification to an operator in SQL server? I am having a backup drive with no raid on it. Please show me a way, so that, it there is an alert, we can go and remove some old logs. thanks in advance.
May 23, 2003 at 5:32 am
Well, some thoughts on this.
What you can do, is write a small app in some language that checks your directory size and returns either 0 or 1. This return value you can catch and evaluate.
I think this can possibly be done with Windows Scripting Host and the FileSystemObject. I remember the Folder Object has a property Size.
Are my thoughts going in your direction?
Cheers,
Frank
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply