Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sp_Blitz: check 92 fails with an arithmetic overflow when disk is almost full #2837

Closed
ScottL1969 opened this issue Mar 23, 2021 · 1 comment · Fixed by #2841
Closed

sp_Blitz: check 92 fails with an arithmetic overflow when disk is almost full #2837

ScottL1969 opened this issue Mar 23, 2021 · 1 comment · Fixed by #2841
Assignees

Comments

@ScottL1969
Copy link

ScottL1969 commented Mar 23, 2021

Version of the script
SELECT @Version = '8.01', @VersionDate = '20210222';

*What is the current behavior?
Msg 8115, Level 16, State 8, Line 1
Arithmetic overflow error converting numeric to data type numeric. When a drive calculates to 100.00 pct full. It actually has like 8 MB.

If the current behavior is a bug, please provide the steps to reproduce.
Fill up a drive

What is the expected behavior?
Script runs with no error.

@debug = 1

Running CheckId [92].
Msg 8115, Level 16, State 8, Line 1
Arithmetic overflow error converting numeric to data type numeric.
The statement has been terminated.
Running CheckId [103].

Fix: ,(CONVERT(DECIMAL(4,2),(total_bytes/1.0 - available_bytes)/total_bytes * 100)) AS used_percent
Should be ,(CONVERT(DECIMAL(5,2),(total_bytes/1.0 - available_bytes)/total_bytes * 100)) AS used_percent

Calc that failed (100.00) convert only allowed 99.99.
volume_mount_point logical_volume_name total_MB available_MB used_percent
M (New Volume) 153596 136511 11.12
E (New Volume) 1791996 305534 82.95
T (New Volume) 102396 83046 18.90
F (SAPs) 409596 8 100.00

Which versions of SQL Server and which OS are affected by this issue? Did this work in previous versions of our procedures?
SQL 2017

@ScottL1969 ScottL1969 changed the title sp_Blitz: when databases have Numeric-Round Abort turned on, check 92 fails with an arithmetic overflow sp_Blitz: check 92 fails with an arithmetic overflow when disk is almost full Mar 23, 2021
@BrentOzar BrentOzar added this to the 2021-04 Release milestone Mar 24, 2021
@BrentOzar BrentOzar self-assigned this Mar 24, 2021
BrentOzar added a commit that referenced this issue Mar 24, 2021
No arithmetic overflow even when your hard drive has just 8MB free. Closes #2837.
@BrentOzar
Copy link
Member

Great, thanks for the bug report. I've fixed it in the dev branch, and it'll be in the April release with credit to you in the release notes.

PeteSral pushed a commit to PeteSral/SQL-Server-First-Responder-Kit that referenced this issue Apr 20, 2021
No arithmetic overflow even when your hard drive has just 8MB free. Closes BrentOzarULTD#2837.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants