Skip to content

Invoke-DbaBalanceDataFiles - Add -TargetFileGroup parameter#10296

Merged
potatoqualitee merged 1 commit intodevelopmentfrom
claude/issue-8863-20260331-0624
Apr 4, 2026
Merged

Invoke-DbaBalanceDataFiles - Add -TargetFileGroup parameter#10296
potatoqualitee merged 1 commit intodevelopmentfrom
claude/issue-8863-20260331-0624

Conversation

@andreasjordan
Copy link
Copy Markdown
Collaborator

Adds a -TargetFileGroup parameter that allows rebuilding clustered indexes into a specific filegroup, enabling data migration between filegroups.

Closes #8863

Generated with Claude Code

Adds a -TargetFileGroup parameter that allows rebuilding clustered indexes
into a specific filegroup, enabling data migration between filegroups.

When -TargetFileGroup is specified:
- All tables with clustered indexes are eligible (bypasses the 2+ files requirement)
- The target filegroup is validated to exist and be writable
- Each clustered index's FileGroup property is set before rebuild
- The original filegroup is restored in memory if the rebuild fails

Resolves #8863

(do Invoke-DbaBalanceDataFiles)

Co-authored-by: Andreas Jordan <andreasjordan@users.noreply.github.com>
@potatoqualitee potatoqualitee merged commit daa4e30 into development Apr 4, 2026
15 checks passed
@potatoqualitee potatoqualitee deleted the claude/issue-8863-20260331-0624 branch April 4, 2026 21:08
@potatoqualitee
Copy link
Copy Markdown
Member

Appreciate it 🙏🏼

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.

Add ability to rebuild into a new filegroup for Invoke-DbaBalanceDataFiles

2 participants