Duplicates record creating in the "sys_user_has_Role"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
Hello @all
We created a sandbox environment and cloned it from PROD. However, we noticed an issue: Users which are added to a group, the roles associated with that group are not being assigned to the user. If we remove and re-add the user manually, the roles get assigned correctly.
To resolve this, we decided to use a script to delete records from the sys_user_grmember table and recreate them. This approach works fine for a single record, but when we remove the limit or increase it to process multiple records, the instance hangs and starts creating thousands of duplicate records in the sys_user_has_role table.
Has anyone faced this issue before or knows how to fix it? Alternatively, we are considering cloning the instance again, but we need confirm clone configuration details so that will restore all data and ensure that roles assigned through groups work as expected.
Thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
Is the table sys_user_has_role excluded from clone. I would suggest checking the Exclude tables.
Also, if you want to use script, can you post your script here to validate?
Please mark this response as correct or helpful if it assisted you with your question.
