Database Tuning (MOSC)

MOSC Banner

Diagonose "ORA-04021 timeout waiting to lock object " What's holded the lock ? | Trigger Cant Captu

edited Nov 13, 2014 10:00AM in Database Tuning (MOSC) 1 commentAnswered

Hey,

The target is to diagonse and SHOW the developers what's holding the lock on partition when the agregate job loads data.

I just put the trigger to catch session id and sql_id ( after servererror trigger )   but... all errros were logged except "ORA-04021 timeout".

any ideas ?

The Library Cache Tiemout is set to default 15 minutes. ( I reproduced the error )

CREATE OR REPLACE TRIGGER catch_errors

   after servererror on database

declare

   sql_text ora_name_list_t;

   msg_     varchar2(2000) := null;

   stmt_    varchar2(2000) := null;

begin

  for depth in 1 .. ora_server_error_depth loop

    msg_ := msg_ || ora_server_error_msg(depth);

  end loop;

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center