dataplat / dbatools

🚀 SQL Server automation and instance migrations have never been safer, faster or freer
https://dbatools.io
MIT License
2.39k stars 787 forks source link

Update-SqlPermission (used by Copy-DbaLogin) - Fix for using LoginRenameHashtable together with user different to login #9313

Closed andreasjordan closed 2 months ago

andreasjordan commented 3 months ago

Type of Change

See issue for details.

This solves the issue, but do we want to leave the user with the old name in the database? Or should the old user be deleted?

potatoqualitee commented 2 months ago

safest way is to leave the old user and give a warning that includes the command to run to delete the user? or opt-in delete user with a switch?

potatoqualitee commented 2 months ago

thank you btw!