search cancel

ORA-04021: Timeout occurred while waiting to lock object ORA-06512: a).


Article ID: 33274


Updated On:


CA eHealth


Problem :

While upgrading eHealth 6.3.2.x to as NH_USER the upgrade fails with the below error in install log file :...
     Error: Database error: updateQueues (ORA-04021: timeout occurred while waiting to lock object ORA-06512: a).
     Error: The program updateQueues failed.
     updating live ex tables ...
     updating cndc tables ...
     Command /opt/CA/ehealth/bin/sys/nhiDbTasks -doConvert -userLog /opt/CA/ehealth/log/conversion.<...>log failed..
     Error : Off line convert failed in convertStandalone.
CA-ehealth 6.2.2 and above
Windows / Linux / UNIX
The ORA-04021 Error Message means that the objects cannot be changed while they are in use, and therefore a lock must be taken out on an object in order to modify it.
Resolution :
To resolve the ORA 04021 Error,  You may wait until the other process has finished using the object or perhaps you can kill the session or recycle the Oracle Server.
  • nhStopDb immediate
  • Reboot the machine
  • Do undo convert "nhConvertDb -undoconvert"
  • Before restarting the ehealth upgrade, execute the command "nhConvertDb -undoconvert"
  • Start upgrade again


Additional Information:

We have also seen this issue on a functioning eHealth poller, with following error:

Pgm nhiPoller[Net]: Unable to add 'network element' data to the database, dropping this poll. 
Pgm nhiPoller[Net]: Sql Error occurred during operation: 'ORA-04021: timeout occurred while waiting to lock object '; possible problem data is: element id: 1317549, sampleTime: 1461128399 for table nh_stats0_1461130199.
For this problem, same solution applies, except for upgrade step:
  • nhServer stop 
  • nhStopDb immediate
  • Reboot the system if possible or
  • nhStartDb 
  • nhServer start


Release: LHDEVC99000-6.3-eHealth-Live Health Upgrade Elements