16 Using the User Garbage Collection Tool to Manage Deleted Users
This chapter describes how to use the usergc.jar
tool to identify and cleanup deleted users.
A user that has been deleted from the internal store or from any external store, such as LDAP, may generate a record in the dn_usergraveyard table. Such users then appear in case management assigned to or modified by searches and can never be cleaned up.
EDQ 14.1.2.0.0 introduces a the usergc.jar tool, which can check whether deleted users are referenced in any of the configuration schema tables.
Execute the following command to run the tool:
$ java -jar usergc.jar [-tables list] [-summary] [-clean file] dbspecifier
The final argument specifies the connection to the configuration schema.
For Oracle the specifier has the format:
oracle:SID@HOST:PORT/USER/PASSWORD
or
oracle:#SERVICE@HOST:PORT/USER/PASSWORD
Here,
- SID is the database SID.
- SERVICE is the database service name.
- HOST is the database host name.
- PORT is the listener port. You can omit the :PORT part if the port is the default 1521.
- USER and PASSWORD are the credentials for the configuration schema.
For Derby the specifier has the format:
derby:(PATHTODB)
Here PATHTODB is the location of the Derby database directory.
The usergc.jar tool scans tables in the database and records usage by users that are marked as deleted in the dn_usergraveyard table. The tool dose not consider usage in the audit log and session history tables because these do not impact functionality.
The other command parameters that you can use are:
-tables list - To check only the tables in the comma-separated list. This parameter can be used to speed up the check when usage only for specific tables is required.
-summary - To list only the number of occurrences of each user in each table. If -summary is not used, then details of each usage are output. For example, for usage in the dn_case table, the external IDs of each record are output. The detailed listing can be used in the case management to guide updates to remove references to users, but this may be too verbose in for the initial scan.
-clean file - To generate SQL in the file to remove users that are not referenced in any table. Do not use this in conjunction with -tables list because some reference to the user could be missed.