September 18, 2019 at 9:34 pm
cteDailyGrowth AS (
--using the row number, join the drive free table to itself, offset by one day. this gets the free
-- space for each drive on that day and also on the next day.
SELECT di1.RowNum, di1.EntryDate, di1.DataFree CurrentData, di1.LogFree CurrentLog, di1.BackupFree CurrentBackup,
di2.DataFree NextData, di2.LogFree NextLog, di2.BackupFree NextBackup
FROM cteDriveInfo di1
INNER JOIN cteDriveInfo di2 ON di2.RowNum = di1.RowNum + 1
April 21, 2024 at 9:58 pm
I implemented a similar solution at work, logging the disk free space (along with database free space) to a table along with when it was recorded. Simple SSRS report front end to graph out the last 30 days is emailed every morning, and the report allows selection of longer time periods and more specific drives/servers. Works well for us, and we can at a glance see if there is a worrying trend in disk usage occurring, and then we can drill down and see if a specific database is causing it. Has saved our bacon a couple of times.
I know this is an older post but it's still highly appropriate. This is a cool idea and I think you should write an article on it, if you haven't already. If you already have, I'd love to see the link. If you haven't I'd love to goad you into doing so. It would help a lot of folks out.
--Jeff Moden
Change is inevitable... Change for the better is not.
April 22, 2024 at 7:39 am
Sam Catchesides wrote:I implemented a similar solution at work, logging the disk free space (along with database free space) to a table along with when it was recorded. Simple SSRS report front end to graph out the last 30 days is emailed every morning, and the report allows selection of longer time periods and more specific drives/servers. Works well for us, and we can at a glance see if there is a worrying trend in disk usage occurring, and then we can drill down and see if a specific database is causing it. Has saved our bacon a couple of times.
I know this is an older post but it's still highly appropriate. This is a cool idea and I think you should write an article on it, if you haven't already. If you already have, I'd love to see the link. If you haven't I'd love to goad you into doing so. It would help a lot of folks out.
SQL agent job running posh cmd is best way these days, to get any OS related info including drive space.
ive started building a warehouse that uses CMS and each remote instance has a linked server and agent jobs which fire into tables on a db on the CMS instance
-----------------------------------------------------------------------------------------------------------
"Ya can't make an omelette without breaking just a few eggs" 😉
April 22, 2024 at 1:23 pm
Central Management Server
-----------------------------------------------------------------------------------------------------------
"Ya can't make an omelette without breaking just a few eggs" 😉
April 22, 2024 at 1:29 pm
Thanks.
Is there a standard schema for the tables?
412-977-3526 call/text
April 22, 2024 at 6:54 pm
Whatever schema you want them to be
-----------------------------------------------------------------------------------------------------------
"Ya can't make an omelette without breaking just a few eggs" 😉
April 23, 2024 at 1:20 am
Jeff Moden wrote:Sam Catchesides wrote:I implemented a similar solution at work, logging the disk free space (along with database free space) to a table along with when it was recorded. Simple SSRS report front end to graph out the last 30 days is emailed every morning, and the report allows selection of longer time periods and more specific drives/servers. Works well for us, and we can at a glance see if there is a worrying trend in disk usage occurring, and then we can drill down and see if a specific database is causing it. Has saved our bacon a couple of times.
I know this is an older post but it's still highly appropriate. This is a cool idea and I think you should write an article on it, if you haven't already. If you already have, I'd love to see the link. If you haven't I'd love to goad you into doing so. It would help a lot of folks out.
SQL agent job running posh cmd is best way these days, to get any OS related info including drive space.
ive started building a warehouse that uses CMS and each remote instance has a linked server and agent jobs which fire into tables on a db on the CMS instance
Is that Posh command a call to WMIC VOLUME? If so, can you demonstrate how you're parsing the data to get it to a table?
--Jeff Moden
Change is inevitable... Change for the better is not.
April 23, 2024 at 8:59 am
many different ways of doing it using various cmdlets, had been trying get-volume and get-wmiobject, get-ciminstance seems to be preferred though, looking to make use of the sql table target cmdlets to get the data into a database
-----------------------------------------------------------------------------------------------------------
"Ya can't make an omelette without breaking just a few eggs" 😉
April 23, 2024 at 2:42 pm
what would have been a better way to ask this question?
Is there a standard schema for the tables?
412-977-3526 call/text
April 23, 2024 at 2:52 pm
it all depends on what data you wish to harvest and build the schema to match, there's no offering out of the box that i've seen
-----------------------------------------------------------------------------------------------------------
"Ya can't make an omelette without breaking just a few eggs" 😉
Viewing 11 posts - 46 through 55 (of 55 total)
You must be logged in to reply to this topic. Login to reply