Skip to content

Export-DbaUser - Use server version instead of db compat level for scripting#10344

Merged
potatoqualitee merged 1 commit intodevelopmentfrom
claude/issue-10343-20260413-1748
Apr 15, 2026
Merged

Export-DbaUser - Use server version instead of db compat level for scripting#10344
potatoqualitee merged 1 commit intodevelopmentfrom
claude/issue-10343-20260413-1748

Conversation

@andreasjordan
Copy link
Copy Markdown
Collaborator

When no -DestinationVersion is specified, use the actual SQL Server instance version rather than the database compatibility level as the SMO scripting target. This fixes an error where databases on newer SQL Server instances (e.g., 2022) with a lower compatibility level (e.g., 120/SQL2014) could not export users that use features not available at the compat level, such as External users introduced in SQL Server 2016.

Fixes #10343

Generated with Claude Code

…ripting

When no -DestinationVersion is specified, use the actual SQL Server instance
version (VersionMajor) rather than the database compatibility level as the
SMO scripting target. This fixes an error where databases on newer SQL Server
instances (e.g., 2022) with a lower compatibility level (e.g., 120/SQL2014)
could not export users that use features not available at the compat level,
such as External users introduced in SQL Server 2016.

Fixes #10343

(do Export-DbaUser)

Co-authored-by: Andreas Jordan <andreasjordan@users.noreply.github.com>
@potatoqualitee
Copy link
Copy Markdown
Member

Very nice thank you

@potatoqualitee potatoqualitee merged commit 9900450 into development Apr 15, 2026
15 checks passed
@potatoqualitee potatoqualitee deleted the claude/issue-10343-20260413-1748 branch April 15, 2026 17:25
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.

Export-DbaUser DB version 2022

2 participants