Error: PAM-CM-0068: Could not restore the database: {0}. Contact your CA PAM administrator.
search cancel

Error: PAM-CM-0068: Could not restore the database: {0}. Contact your CA PAM administrator.

book

Article ID: 262605

calendar_today

Updated On:

Products

CA Privileged Access Manager (PAM)

Issue/Introduction

Trying to do a DB compact operation the following error appears in catalina.out


Mar 23, 2023 11:57:26 AM com.ca.pam.rest.DatabaseConfigService compactDatabase
SEVERE: A fatal error occured while re-adding foreign key for the DB compact, 0.

Mar 23, 2023 11:57:26 AM com.ca.pam.rest.DatabaseConfigService compactDatabase
SEVERE: PAM-CM-0068: Could not restore the database: {0}. Contact your CA PAM administrator.

At the same time the session logs show

2023/03/23 11:57:26,dbcompact,system, --, --, --, --, --, --, --, --, --, --, --, --,"PAM-CMN-2150: A fatal error occurred while restoring the database for the DB compact, 0.",0, --,,0

And console.log file in PAM reports the cause of the problem

Mar 23 11:57:26 ERROR 1061 (42000) at line 205: Duplicate key name 'ldap_domain_trust_xxx_x_xxx'

Environment

CA PAM 4.0.0.513 and older

Cause

In releases prior to versions 4.1.X and later 4.0.X, the mechanism for carrying out a DB compact enticed a DB backup and restore.

Unfortunately the MySQL version shipped with those products had an issue with foreign keys at DB restore, and as a result this error was reported

Resolution

This is corrected in later versions of the product for which MySQL uses DB optimization to carry out the compact operation and so it avoids possible problems related to foreign key restore. So please upgrade to any of the later CA PAM versions available and avoid compacting it until not done. No operation is required in the DB