sql server – sp_Blitz – RegOpenKeyEx() returned error 2

I’m running the latest sp_Blitz script on a SQL 2016 Std server on a Windows Server 2016 physical box. I’m getting the following error. What could be causing this and how do I troubleshoot it?

RegOpenKeyEx() returned error 2, ‘The system cannot find the file
specified.’ Msg 22001, Level 1, State 1 Warning: Null value is
eliminated by an aggregate or other SET operation. Msg 0, Level 11,
State 0, Line 0 A severe error occurred on the current command. The
results, if any, should be discarded.

Can SQL Server 2008 – sp_Blitz, sp_BlitzCache, or sp_BlitzFirst identify queries that caused a major growth operation on a particular log file?

You can find automatic growth events from the default trace (use my script and adjust it according to your needs) – the time, the size and the number of times it happened.

You can use extended events – my answer to find out which process caused automatic growth.

The only way to determine the process behind automatic growth is to use Extended events esp. EVENT -> sqlserver.database_file_size_change & sqlserver.databases_log_file_size_changed and ACTION -> sqlserver.sql_text.

Note that since 2008, you are limited to what XEvents will offer. This will be an unsupported version after July 9th. It's time to migrate out of it.

Can Sp_Blitz, sp_BlitzCache, or sp_BlitzFirst identify requests that cause a major growth operation on a particular log file?

No, because they analyze what exists on the server and do not configure any XEvents event.

sp blitz – "Slow Storage Writes on Drive T" warning from sp_Blitz

We migrated our platform to new SQL Server 2016 instances a few days ago. Immediately after the migration, we ran sp_Blitz again, but we noticed the next entry, which concerns the dedicated volume containing tempdb (the eight data files and the single log file reside on the same dedicated volume). All database volumes use SSDs, which is rather surprising:

Slow storage written on the T drive Writes last on average over 100ms
for at least one database on this drive. For a specific database file
speeds, run the query from the information link.

No links were provided, but in the code we found that sp_Blitz uses dm_io_virtual_file_stats to evaluate the following logic:

o_stall_write_ms / (1.0 + num_of_writes))> 100 AND num_of_writes> 100000

Using this logic, the function points to each of our eight tempdb data files, with write speeds between 164 and 198 ms, suggesting that the problem is serious.

To prove the problem to the management, we have since run traces of the Performance Monitor to examine the "Avg. Disk Dry / Write" counter for all volumes attached to the server, but the T volume did not appear to be slower than other volumes the hours of work we sampled.


  • Are we using the wrong PerfMon counter to prove it? If so, which meter should we use?
  • Does the above function indicate the speed or worst speed she has ever encountered (ie should we ignore this warning unless it is still there after next server restart)?
  • Could someone provide additional information / advice?