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.
András Váczi
31.8k13 gold badges103 silver badges152 bronze badges
asked Oct 20, 2016 at 13:23
1
  • which options did you run it with? Commented 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!

answered Oct 20, 2016 at 13:49
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.

answered Oct 20, 2016 at 13:51
2
  • 1
    Hah. Looks like you had an easier time finding it than I did. I'm so bad at GitHub. Commented 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 :) Commented Oct 20, 2016 at 14:16

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.