0

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.

2
  • 2
    sp_Blitz uses xp_regread for two things: to check processor speed and to look for stacked instances. In order to figure out which check this fails on (assuming either one is critical to your health check) you'd need to run Blitz with @Debug = 1 and report back. – Erik Darling Apr 8 at 2:34
  • It looks like it also uses xp_regread to look at power settings. And based on Brent's answer/guess, that might be the one that is failing. I think it needs to check the non-GPO registry key (CurrentControlSet blah blah blah) if the SOFTWARE\Policies\Microsoft\Power\PowerSettings one is missing. I'll see if I can code up a fix and submit it. – Doug Deden Apr 8 at 21:52
0

My guess is that it's related to this Github issue. Another user reported it, but because I can't quickly reproduce it, and the reporting user didn't want to submit code to fix it, we ended up closing the issue.

If you'd like to help troubleshoot and fix that issue, you can make notes in that Github issue, and use the First Responder Kit's Contributing Guide to get started with the code.

1
  • I ran it again and all of the SPs worked, of course. The difference is that I received the errors when I ran it right after a reboot. I'm not sure how that affects it, but that's the only difference :shrugs: – Fubak Apr 9 at 12:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.