dataplat / dbatools

🚀 SQL Server automation and instance migrations have never been safer, faster or freer
https://dbatools.io
MIT License
2.47k stars 802 forks source link

Test-DbaVirtualLogFile - this commands needs to actually test something #2407

Closed wsmelton closed 5 years ago

wsmelton commented 7 years ago

This command as-is does not test anything, it simply gets the VLF count and returns the information.

It should actually test the information. I would propose the current version of Test-DbaVirtualLogFile be renamed to Get-DbaDbVirtualLogFile or just Get-DbaDbVlf.

Then a proper Test-DbaVirtualLogFile command is written that validates the VLF count and offer some recommendation based on that count. I would expect based on the gold standard.

I don't know if we want to work out calculating based on the size of the current log file, how many VLFs it should have if you grew the file out properly (based on the gold standard). If it does not match then we should pop out a warning on it. I would say that is what a proper test command should provide, not just output of DBCC LOGINFO.

potatoqualitee commented 7 years ago

As mentioned in your PR, @ClaudioESSilva had some plans to do a test and afaik it was based on one of Paul's posts.

potatoqualitee commented 6 years ago

Hey @ClaudioESSilva - any chance you can get around to this in the next week? I have a great lil project that could use it ;)

ClaudioESSilva commented 6 years ago

Yes, that's true. We have talked before to implement some math to say "based on X% offset you are over/below the number of VLFs". I will pick this one, but not this year! 😅

Stuart-Moore commented 6 years ago

I think I posted something as well that would work out if your vlf size was flat, growing or shrinking via regression so we could tell growth type. On Wed, 27 Dec 2017 at 09:04, Cláudio Silva notifications@github.com wrote:

Yes, that's true. We have talked before to implement some math to say "based on X% offset you are over/below the number of VLFs". I will pick this one, but not this year! 😅

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/sqlcollaborative/dbatools/issues/2407#issuecomment-354080086, or mute the thread https://github.com/notifications/unsubscribe-auth/AFWoZlY9k_Ue3vt_kDfxN2HxHLPj3Fpcks5tEgglgaJpZM4PxOZp .

jstexasdba commented 6 years ago

Don't know if this will help out but Tracy Boggiano did a post a few months back on VLF's: http://tracyboggiano.com/archive/2017/09/high-vlf-count-fix/

potatoqualitee commented 5 years ago

propose to remove this command in favor of Get

potatoqualitee commented 5 years ago

or actually, let's rename it to Measure-?

wsmelton commented 5 years ago

Well to measure or test it would be a wrapper for the Get command, so this one I'd say rename to get and then a new command becomes the measure or test.

A measure command would be something that outputs aggregated information.

potatoqualitee commented 5 years ago

we do have a Get that is unaggregated, so changing this to Measure could work?

wsmelton commented 5 years ago

Oh, forgot about that one....then yeah just rename it to measure and we should be good.