Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Copy-DbaLogin does not maintain nested Database Role Membership #9555

Open
rootMBX opened this issue Nov 27, 2024 · 0 comments
Open

Copy-DbaLogin does not maintain nested Database Role Membership #9555

rootMBX opened this issue Nov 27, 2024 · 0 comments
Labels
bugs life triage required New issue that has not been reviewed by maintainers

Comments

@rootMBX
Copy link

rootMBX commented Nov 27, 2024

Verified issue does not already exist?

I have searched and found no existing issue

What error did you receive?

When using Copy-DbaLogin to migrate SQL Logins and Database Users from 1 instance of a database to another, the destination has its Database Role Memberships flattened.

Source:

  • Role 1 <- Role 2 <- User 1

Destination (Flattened):

  • Role 1 <- Role 2
  • Role 1 <- User 1
  • Role 2 <- User 1

I'd be nice if membership was mirrored instead of flattened. Any way that can be added?

Steps to Reproduce

$htSyncParameters = @{
Source = 'server1.domain.com'
Destination = 'server2.domain.com'
}

Copy-DbaLogin @htSyncParameters -ExcludeLogin $strExcludeLogins -ExcludeSystemLogins -ObjectLevel -KillActiveConnection -Force

Please confirm that you are running the most recent version of dbatools

2.1.28

Other details or mentions

No response

What PowerShell host was used when producing this error

PowerShell Core (pwsh.exe)

PowerShell Host Version

Name Value


PSVersion 7.4.6
PSEdition Core
GitCommitId 7.4.6
OS Microsoft Windows 10.0.22631
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0

SQL Server Edition and Build number

Microsoft SQL Server 2022 (RTM-CU16) (KB5048033) - 16.0.4165.4 (X64)
Copyright (C) 2022 Microsoft Corporation
Developer Edition (64-bit) on Windows Server 2022 Standard 10.0 (Build 20348: ) (Hypervisor)

.NET Framework Version

.NET 8.0.10

image
@rootMBX rootMBX added bugs life triage required New issue that has not been reviewed by maintainers labels Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugs life triage required New issue that has not been reviewed by maintainers
Projects
None yet
Development

No branches or pull requests

1 participant