Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Remove all duplicate group names with unique group ids.

Sharmila Gurumurthy
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 22, 2018

I am currently doing the steps in the below link:

Remove all duplicate group names with unique group ids.

    1. https://confluence.atlassian.com/confkb/how-to-remove-groups-from-confluence-via-the-database-803603007.html

I got past all steps, but when I do the final delete , I get the below error.

DELETE from cwd_group WHERE id IN ( I pass some ID values here)

 

Msg 547, Level 16, State 0, Line 24

The DELETE statement conflicted with the REFERENCE constraint "fk_child_grp". The conflict occurred in database "dwiki001", table "dbo.cwd_membership", column 'child_group_id'.

The statement has been terminated.

1 answer

0 votes
Hassan Aftab
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 5, 2018

Hi Sharmila

 

The guide you have mentioned assumes that the groups are empty and have no memberships. 

For groups which have members, will have references to other tables like cwd_membership, which is causing the referential constraint right now.

You will have to delete all references to the groups from cwd_membership table before deleting any groups from cwd_group.

Please run the query mentioned in Point 2 of Section 2 of the guide you are using to delete all the members first.

After this please run the SQL queries again to delete the groups.


Thanks,

Hassan Aftab

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events