dbachecks icon indicating copy to clipboard operation
dbachecks copied to clipboard

New Check - warn if there is not enough disk space for a file to grow

Open michalporeba opened this issue 6 years ago • 6 comments

Especially with big file growth increments it is possible that there is still space in the file, but there is not enough space on the file for the next increment.

Arguably this may be covered by simply checking the disk space but that is asumming that everythign is fine. I have just started a new job and I'm in situation where there is less disk space than I'd like. If I wanted to have 20% or even 10% of disk space free I'd constantly see red. While the hardware is sorted out I'd like to be able to at least make sure no database will fill up if it is at all avoidable.

michalporeba avatar Feb 26 '18 20:02 michalporeba

LOVE, yes please!

potatoqualitee avatar Feb 26 '18 20:02 potatoqualitee

This is an excellent test

SQLDBAWithABeard avatar Feb 27 '18 07:02 SQLDBAWithABeard

The Get-DbaDatabaseFile command would have all properties that are needed for this check. ref.

Properties I'd expect would be of use:

  • Database
  • NextGrowthEventSize
  • VolumeFreeSpace

wsmelton avatar Mar 04 '18 06:03 wsmelton

I wrote a sort of check for this today...

I can give the raw, working code if you like. The current version is instance based because of a client question who wanted monitoring on disk space. All databases should be able to grow once. If there's not enough space, some warning should be given.

reitse avatar Jun 07 '19 20:06 reitse

#623 has been pull requested. And will no doubt be shot down but it might inspire the actual smart people here. Maybe.

reitse avatar Jun 07 '19 21:06 reitse

Thank you. Definitely not shot down.

SQLDBAWithABeard avatar Jun 12 '19 07:06 SQLDBAWithABeard