How to Reset Team Calendar Subscription of a User
Platform Notice: Data Center - This article applies to Atlassian products on the Data Center platform.
Note that this knowledge base article was created for the Data Center version of the product. Data Center knowledge base articles for non-Data Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Problem
You are an administrator of Confluence and you want to remove all calendar subscriptions from a user.
Resolution
Please back up your database before making any of the changes below. This is not supported and is only meant to be a guide.
In order to delete all calendar subscriptions of a single user:
- Shut down Confluence
Find the
user_key
of the user by executing the SQL:SELECT * FROM user_mapping WHERE username = '<username>';
Take note of the
user_key
columnExecute the DELETE SQL query below. Replace CREATOR values with the user_key values obtained from step 2:
DELETE FROM "AO_950DC3_TC_SUBCALS" WHERE "CREATOR" = '<user_key>' AND "SUBSCRIPTION_ID" IS NOT NULL;
This will remove all subscriptions to calendars other than the calendar that the user created on its own.
If you get an FK violation error for '
fk_ao_950dc3_tc_subcals_parent_id
' while running the above query, please try the below alternative as it removes the records that have FK relation through the 'PARENT_ID
' column then proceed with the deletion of parent records:DELETE FROM "AO_950DC3_TC_SUBCALS" WHERE "CREATOR" = '<user_key>' AND "SUBSCRIPTION_ID" IS NOT NULL AND "PARENT_ID" IS NOT NULL; DELETE FROM "AO_950DC3_TC_SUBCALS" WHERE "CREATOR" = '<user_key>' AND "SUBSCRIPTION_ID" IS NOT NULL AND "PARENT_ID" IS NULL;
- Start Confluence