Skip to content

Get-DbaPermission - Fix Azure SQL DB compatibility#10320

Merged
potatoqualitee merged 1 commit intodevelopmentfrom
claude/issue-9612-20260405-0855
Apr 7, 2026
Merged

Get-DbaPermission - Fix Azure SQL DB compatibility#10320
potatoqualitee merged 1 commit intodevelopmentfrom
claude/issue-9612-20260405-0855

Conversation

@andreasjordan
Copy link
Copy Markdown
Collaborator

Fix Get-DbaPermission for Azure SQL Database by skipping unsupported server-level permission queries and replacing SUSER_SNAME(owner_sid) with an Azure-compatible subquery.

Fixes #9612

Generated with Claude Code

- Skip server-level permissions query on Azure (unsupported sys.server_* views)
- Replace SUSER_SNAME(owner_sid) with database-scoped subquery on Azure
- Both changes are gated on $server.IsAzure to avoid changing non-Azure behavior

Fixes #9612

(do Get-DbaPermission)

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

Very nice 👌🏼

@potatoqualitee potatoqualitee merged commit 5f483d4 into development Apr 7, 2026
15 checks passed
@potatoqualitee potatoqualitee deleted the claude/issue-9612-20260405-0855 branch April 7, 2026 18:49
potatoqualitee added a commit that referenced this pull request Apr 10, 2026
Co-authored-by: Copilot <223556219+Copilot@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.

Az SQL DB connections destroyed by redundant Connect-DbaInstance in multiple functions

2 participants