SQL-Server-First-Responder-Kit icon indicating copy to clipboard operation
SQL-Server-First-Responder-Kit copied to clipboard

Standardize parameter format across procs

Open BrentOzar opened this issue 10 years ago • 9 comments

Use @PascalCase for params on everything, like @ExpertMode = 1.

Yes, this will be a breaking change for folks, and we'll need to test this with our own utilities too, but it's the right thing to do going forward before we make the big public push.

(Updated - originally called that @CamelCase)

BrentOzar avatar Jun 11 '16 14:06 BrentOzar

I'm gonna be a bit pendantic and point out that this is camelCase and this is PascalCase.

AndySchwabe avatar Jun 11 '16 15:06 AndySchwabe

DAMMIT THERE'S A BUG AND I HAVEN'T EVEN STARTED CODING YET

BrentOzar avatar Jun 11 '16 15:06 BrentOzar

Is there an overall desired type of formatting? Is it documented? I.e. Right align vs left align, tabs vs spaces, tab size, etc...

AndySchwabe avatar Jun 11 '16 16:06 AndySchwabe

No, in the past, we had a few different authors on these, each of which had their own formatting standards. I'll create a documentation ticket for that. We'll probably use the default formatting in https://format-sql.com/ just to give users something they can easily do without a paid tool.

BrentOzar avatar Jun 11 '16 16:06 BrentOzar

Stuff we'll have to do:

  • Find/replace in the stored procs.
  • Update the documentation.
  • Change the querymanifest.json in the collector to use the right params. (Starting a separate ticket for that one.)

BrentOzar avatar Jun 12 '16 14:06 BrentOzar

@Version output parameter for sp_AskBrent and sp_Blitz has been an int, but that's no longer useful since we're switching to semantic versioning. Removing that, and just leaving the @VersionDate parameter.

BrentOzar avatar Jun 13 '16 12:06 BrentOzar

sp_AskBrent @SkipChecksQueries changed to @CheckProcedureCache (to match sp_Blitz). Is still defaulted to off until we can put better logic in there to explain to users which queries suck.

BrentOzar avatar Jun 13 '16 13:06 BrentOzar

sp_BlitzCache @results parameter replaced with @ExpertMode. @results had choices for narrow, simple (default), or expert. Narrow is now gone.

@whole_cache replaced with @BringThePain = 1 to match other procs.

BrentOzar avatar Jun 13 '16 14:06 BrentOzar

I'm sure there's going to be bugs with this - for example, in sp_BlitzCache I found that the old parameter @whole_cache wasn't even hooked up to anything - but marking this as complete since the parameter names have been changed, at least.

BrentOzar avatar Jun 13 '16 15:06 BrentOzar