ALERT: Some images may not load properly within the Knowledge Base Article. If you see a broken image, please right-click and select 'Open image in a new tab'. We apologize for this inconvenience.

Deleting inactive users into CEMDB

book

Article ID: 132929

calendar_today

Updated On:

Products

CA Application Performance Management Agent (APM / Wily / Introscope) INTROSCOPE

Issue/Introduction

This document intent to give another option to delete users inside CEMDB, note that the official procedure to delete inactive users is listed inside this document, intention of this document is to give another optimized option.

Environment

Any Application Performance Management release.

Resolution

Option 1 - Oficial procedure

1) Under "Data Retention Settings", you will see "Make Users Inactive after".
2) Set it as less value acceptable, in this case, 3 days.
3) Wait 3 days and run a "Vacuum" against your APMDB. 

Option 2 - Optimized

1) Make sure that you have a backup from your database before begin, this is an optional procedure and Non-oficial, meaning that it is out of support scope.
2) Connect to your database using PGAdmin tool.
3) List all active users into the database: 

select * from ts_users where ts_active;

4) Check If the users that you want to delete is as "active" under the column "ts_active", it should appears as "true" or "false"
5) inactivated the selected user by running below query, note that you must to identify under "ts_id" column the ID from the user that you want to inactivated: 

update ts_users
set ts_active = false
where ts_id = <IDFromTheUser>; 

6) Search again for the users affected to make sure that it is inactivated: 

select * from ts_users where ts_id = <IDFromTheUser>;

7) Confirm that user selected is inactivated, column "ts_active" showing "false" flag.
8) You now are able to delete it from your database, to do so, run below query, make sure that "ts_id" is the correct one: 

DELETE FROM ts_users
WHERE ts_id = <IDFromTheUser>

Additional Information

Make sure that you have a backup from your database before begin, this is an optional procedure and Non-oficial, meaning that it is out of support scope, all support for this must be requested in our communities:

https://communities.ca.com/community/ca-apm/content