Skip to content

Comments

Fix arithmetic overflow in Get-DbaDatabase for very large databases#10105

Merged
potatoqualitee merged 1 commit intodevelopmentfrom
claude/issue-10104-20260121-0728
Jan 21, 2026
Merged

Fix arithmetic overflow in Get-DbaDatabase for very large databases#10105
potatoqualitee merged 1 commit intodevelopmentfrom
claude/issue-10104-20260121-0728

Conversation

@potatoqualitee
Copy link
Member

Cast size column to BIGINT before SUM to prevent INT overflow when database files exceed ~2TB total size. Affects all three query variants:

  • Azure SQL Database (sys.database_files)
  • SQL Server 2005+ (sys.master_files)
  • SQL Server 2000 (sysaltfiles)

Fixes #10104

Generated with Claude Code

Cast size column to BIGINT before SUM to prevent INT overflow when database
files exceed ~2TB total size. Affects all three query variants:
- Azure SQL Database (sys.database_files)
- SQL Server 2005+ (sys.master_files)
- SQL Server 2000 (sysaltfiles)

Fixes #10104

(do Get-DbaDatabase)

Co-authored-by: Chrissy LeMaire <[email protected]>
Copy link
Contributor

@niphlod niphlod left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good bot

@potatoqualitee potatoqualitee merged commit 28beeda into development Jan 21, 2026
16 checks passed
@potatoqualitee potatoqualitee deleted the claude/issue-10104-20260121-0728 branch January 21, 2026 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Arithmetic overflow error converting expression to data type int

2 participants