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.
-
which options did you run it with?Vladimir Oselsky– Vladimir Oselsky2016年10月20日 13:25:33 +00:00Commented Oct 20, 2016 at 13:25
2 Answers 2
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!
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.
-
1Hah. Looks like you had an easier time finding it than I did. I'm so bad at GitHub.Erik Reasonable Rates Darling– Erik Reasonable Rates Darling2016年10月20日 13:57:57 +00:00Commented 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 :)James Rhoat– James Rhoat2016年10月20日 14:16:50 +00:00Commented Oct 20, 2016 at 14:16
Explore related questions
See similar questions with these tags.