2 Minuten Lesezeit (474 Worte)

Output results of sp_Blitz in markdown format

The sp_Blitz procedure from Brent Ozar's First Responder Kit checks the configuration and state of Microsoft SQL Servers and presents problems found in a tabular format. We like to use this procedure during the first contact with new customers to get a quick overview of their SQL Servers.
Recently I learned about the possibility to output the results in Markdown format. I would like to introduce this here, because it offers advantages - but unfortunately it also has disadvantages, too.

The advantages

In most cases, the customer runs the procedure in SQL Server Management Studio and copies the result to an Excel spreadsheet. However, the @OutputType parameter can also be used to generate the output in other formats, including an enumerated list in Markdown. This way the result can be quickly copied into a mail, because even without a markdown editor, such a bulleted list is very easy to read.

We can then very easily add further information to this list and prepare the list for the customer in this way, to then jointly tackle the problems relevant to the customer. In many cases, an enumerated list is also better suited for documentation purposes than a table.

The functionality

But beware: Unfortunately, only a look into the source code reveals the exact functionality since only a short documentation is available in the source code. Because with @OutputType = 'markdown' the following happens:

The parameter @CheckProcedureCache is set to 0, but this is also the default value for this parameter (source code).

The @CheckServerInfo parameter is set to 1, which outputs additional information such as the version used or the hardware equipment (source code).

However, the output does not contain any information about security aspects. It was introduced because this functionality was originally intended for quickly sharing information over a public channel on Slack, and such sensitive information should obviously not show up there (source code).

The disadvantages

Unfortunately, this means that this functionality is no longer suitable for a comprehensive look at the system. However, if only the most important problems are concerned, the parameter @IgnorePrioritiesAbove with the value 50 is used in most cases. This setting then also suppresses all security aspects anyway, so an output in Markdown no longer changes the content and can thus be used for a quick overview:

sp_Blitz @IgnorePrioritiesAbove = 50, @OutputType = 'markdown'

My solution

There is of course the possibility to make the conversion from the classic table output to the Markdown format yourself, for example with PowerShell. I have programmed this and thereby added a few configuration options. You can find the script in my GitHub repository.

If you are interested, we can also adapt the script to your needs, feel free to contact us.

Principal Consultant bei ORDIX.

 

Kommentare

Derzeit gibt es keine Kommentare. Schreibe den ersten Kommentar!
Gäste
Freitag, 07. Oktober 2022

Sicherheitscode (Captcha)

×
Informiert bleiben!

Bei Updates im Blog, informieren wir per E-Mail.