Skip to content

Invoke-DbaBalanceDataFiles - Add -TargetFileGroup parameter#10296

Open
andreasjordan wants to merge 1 commit intodevelopmentfrom
claude/issue-8863-20260331-0624
Open

Invoke-DbaBalanceDataFiles - Add -TargetFileGroup parameter#10296
andreasjordan wants to merge 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>
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

1 participant