1

I am seeing a divide by zero message while running sp_BlitzIndex. I am running Microsoft SQL Server 2008 (SP3) - 10.0.5775.0 (X64) Enterprise Edition (64-bit) on Windows NT 5.2 (Build 3790: Service Pack 2) (VM)

Msg 50000, Level 16, State 1, Procedure sp_BlitzIndex, Line 1535
SIOP database failed to process. Divide by zero error encountered.
1
  • which options did you run it with? Oct 20, 2016 at 13:25

2 Answers 2

3

That's my bug! It's in the statistics gathering portion. If you search for the line:

CASE WHEN si.rowmodctr > 0

Replace the whole case expression with this:

CASE WHEN si.rowmodctr > 0 THEN CAST(si.rowmodctr / ( 1. * NULLIF(si.rowcnt, 0) ) * 100 AS DECIMAL(18, 1))
                                     ELSE si.rowmodctr
                                END AS percent_modifications,

The best place to file bug reports for Blitz* scripts is over here.

Thanks!

0
1

I believe this would be related to the bug listed on the github issues page #525. That was fixed 5 days ago. Go ahead and pull the new committed code and it should resolve the problem.

2
  • 1
    Hah. Looks like you had an easier time finding it than I did. I'm so bad at GitHub. Oct 20, 2016 at 13:57
  • I am too, I just follow your project pretty close. Helps me learn by monitoring other projects and doing. Trying to see if I would do it differently. Additionally, the filter on the issues page helps a bunch :) Oct 20, 2016 at 14:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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