Database Health Check and Self-Healing
This feature automatically examines the state of the database schema and in some cases executes additional self-healing operations to reach expected consistency with a reference state. This replaces the index integrity checker available in version before Codebeamer 22.04.
Triggering health-check
Health check will run periodically 5 minutes after midnight every day. It can be manually triggered by a System Administrator on the System AdminDatabase performance job page, by clicking the Recheck Database Health link. The check runs in the background and completes in about 1 minute.
If problems were found, after refreshing the page, the system notifies the user: "Suboptimal database health detected. Please contact support to help resolving the issue.
For further information about the steps to be taken, see: How to fix database health check issues.
What does health checker validate?
The validated list of database objects are the following:
Database tables (including column datatypes, constraints).
Indices (with column list and ordering).
Sequences (with starting values and current values).
The health checker also collects any additional elements which were not recognized and could negatively affect the application's performance.
When does the self-healer run and what does it affect?
Self-healer will automatically run in one of the following cases:
A database upgrade occurred, which executed patch files and altered the database version.
If current database was migrated from an another dialect.
* 
Self-healer can only run before the Codebeamer application begins serving requests to users. During normal Codebeamer operations it's only possible run the health checker part.
Self-healing does not affect data, since health checks only examine the database structure. The generated statements only do schema alternations which are safe to run.
If self-healing cannot be completed due to an error, it will not try to fix the database again until an another upgrade. In such a case, the user has to manually intervene. Codebeamer will still start up and become accessible, however optimal performance couldn't be guaranteed. It is recommended to contact Codebeamer support for further instructions (see: How to fix database health check issues).
Examine output of health checker
The results of health checking is recorded in the application log.
If the database was healthy, the following two lines are in the log:
2022-01-24 10:44:42,416 INFO upgradeLogger - Checking database health... <thread info>
2022-01-24 10:44:45,223 INFO upgradeLogger - Database is healthy. <thread info>
In case of a problem, a longer log entry is recorded in the log:
2022-05-23 09:19:59,500 WARN rdbms.health.DatabaseHealthCheckJob - Database health check validation result:
<report of database objects with differences>
Database self healing dry-run script output:
<generated dry run SQL script>
Save this log entry, as it is essential for Codebeamer Support to help fixing the database.
How to fix database health check issues
In case the self-healer couldn't fix the database there is no additional automated way to fix the database state. Manual intervention is required. Please contact Codebeamer support and attach the output of the health checker.
If this output is not found, run a health-check manually (Triggering health-check). Then extract the output of the health-check report including the dry run SQL script (Examine output of health checker) and send it in a support request.
Was this helpful?