How does getsql2005dbfreespace.vbs get database paths
-
Monday, August 20, 2012 2:09 PM
Hi,
We have 2 servers, A & B. B stores the log-shipping file of A.
I am getting SCOM alerts for 2 scripts getsql2005dbfreespace & getsql2005dbfilesfreespace, both complaining that there is no F: Drive on server B, which there is not.
So how do the paths get indentified by the scripts?
All Replies
-
Tuesday, August 21, 2012 6:20 AMModerator
It looks at the properties of the database in the master database of the server. This discovers the database file paths for data and log file(s). And from there it tries to run that second script. Also the firsts cript check the available space inside the database and if it is set to autogrow it will request the free space data from the drive it thinks the database is on as well.
Check in monitoring pane all the way near the top. Discovered Inventory. CHange Target type.
Try different ones. database, sql database, sql db file. This last one will give you the drive it discovered the file on for instance.Bob Cornelissen - BICTT (My Blog about SCOM) - MVP 2012 and Microsoft Community Contributor 2011 Recipient
- Marked As Answer by Nicholas LiMicrosoft Contingent Staff, Moderator Wednesday, August 29, 2012 9:48 AM
-
Wednesday, September 19, 2012 10:41 AM
Cheers Bob, sorry for the late reply have been off work due to illness.
That's what I thought just can't get the DBAs to believe it. The DBAs are off loading logs to a different server and the servers are setup differently so the drive letters don't match.
Can I ask another question, how often do these scripts get run. Have tried searching SCOM but so far not had any luck.
-
Wednesday, September 19, 2012 12:55 PMModerator
Easy if you can not find the monitor or rule doing this.. check out the performance view!
in monitoring pane -> microsoft SQL server -> Databases -> Database free space.
select one database. if it gives you a line you can change the time range to for instance 1 or 2 hours.
move your mouse across the line.In my case I saw 14:12 and 13:57 as two datapoints. SO best guess is every 15 minutes.
Bob Cornelissen - BICTT (My Blog about SCOM) - MVP 2012 and Microsoft Community Contributor 2011 Recipient
-
Thursday, September 20, 2012 9:25 AM
Cheers again Bob,
Looks like ours run once an hour...

