We updated a user's last name on the account, and it took the user out of all the groups which she was part of.
Is there a query or a workaround to find what groups the user was part of?
Try this:
select group_name from dm_group where any i_all_users_names like 'User_name%';
You shouldn't rename users like this. Use the reassign user functionality in DA instead and the dm_UserRename job.
: I understand how to use the userrename job. However, the rename was done incorrectly done by my colleage and we are scrambling to find a fix.
jkk: Your query lists the current groups which the user belong to. I need something which the user WAS part of groups before the rename.
If you didn't turn on auditing for group changes, then you won't find this information. The only way is by restoring the database prior to the change.