When opening an MXD document or while trying to add a database connection, the following error is encountered:
Failed to connect to database.
Underlying DBMS error[ORA-28000: the account is lockedNo extended error.]
This error may be returned due to following reasons:
- User password was changed and the user tries to re-source the layers in an MXD document with an existing database connection using an old password. This locks the user account by exceeding the maximum number of times specified by the user profile parameter FAILED_LOGIN_ATTEMPTS.
- The user account has been locked by the DBA.
Solution or Workaround
These issues can be resolved by:
- Using the arcpy.mapping module to find and repair data links for a number of map documents before launching any of the saved MXDs that might be using the old credentials.
- Having the DBA unlock the user account and temporarily set the FAILED_LOGIN_ATTEMPTS parameter in Oracle to unlimited. Once the MXDs are repaired individually and saved, the setting can be reverted.