Monday, November 17, 2008

ORA-04021: timeout occurred while waiting to lock object

This morning I received an e-mail from my college... she got an error while doing upgrade on her environment. This had happen few times when they finish do Fresh Install, and bring up the middleware and later when middleware has been brought down, they got error while doing upgrade.

I was a looking for a solution about this, without using DBA studio (still using Oracle9i). So what I asked them to do:

1. Bring down the middleware.
2. Connect to SQL as sysdba, and check the processes running using that schema/dbuser.
SQL>select sid, serial#, schemaname from v$session;

3.They will see some output and kill the processes using:
SQL>alter system kill session 'sid,serial#';

4.At one point, they schemaname still exist but we should check the status for that session.
SQL>select sid, serial#, status, process from v$session where schemaname='SCHEMANAME';
If the status given is 'KILLED', means all processes has been killed. Then they able to proceed with their installation.


en_me said...

hi akak ittewww.. salammmz