August 15, 2010 at 7:55 am
Hi guys,
i m working on a script to find old backups in all disk drives.
i have reached a part where i have the full path of all backup files in temp table.
but i m not able to get file date.i was trying to use xp_getfiledetails but it has been removed from 2005 onwards.
so i was thinking of incorporating vbscript in t-sql as a function. like if we pass the path as a variable it will return the last modified date.
Can it be done?
Or is there any other option?
August 16, 2010 at 3:16 pm
I have used logparser to do this, takes some time to get all the file details but you can insert into a table and use a while loop to get to all your servers. You can then query and try and find the old backups that may be laying about. Look at this post : http://www.sqlservercentral.com/Forums/Topic785529-1647-1.aspx and check out the proc utl_GetFileSystemDetail
I modified it a little and can audit upwards of 90+ production server drives in a little over a day.
Andrew
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy