|
|
ORA-06512 Tips
Oracle Error Tips by Donald Burleson
|
Oracle docs note this about Oracle ORA-06512: ORA-06512: at stringline string. Cause: Backtrace message as the stack is unwound by unhandled exceptions.
Action: Fix the problem causing the exception or write an exception handler for this condition. Or you may need to contact your application administrator or DBA.
Oracle ORA-06512 is the catch-all Oracle error for PL/SQL exceptions.
Oracle ORA-06512 will generally appear as part of a message stack in which the message directly preceding
Oracle ORA-06512 will list the reason for the error. For example,
this user finds himself being thrown
Oracle ORA-06512 and ORA-04088 while attempting to create a custom trigger as follows:
1 CREATE OR REPLACE TRIGGER hari_dt
2 BEFORE INSERT
3 ON
4 hari
5 FOR EACH ROW
6 DECLARE
7 v_name varchar2(20);
8 BEGIN
9 v_name :=upper(:new.name);
10 insert into hari values(v_name);
11* end;
12 /
Trigger created.
SQL> insert into hari values('harindar');
insert into hari values('harindar')
*
ERROR at line 1:
ORA-00036: Maximum number of recursive sql levels (50) exceeded
ORA-06512: at "BUSMASTERQ.HARI_DT", line 5
ORA-04088: error during execution of trigger 'BUSMASTERQ.HARI_DT'
ORA-06512: at "BUSMASTERQ.HARI_DT", line 5
ORA-04088: error during execution of trigger 'BUSMASTERQ.HARI_DT'
ORA-06512: at "BUSMASTERQ.HARI_DT", line 5
ORA-04088: error during execution of trigger 'BUSMASTERQ.HARI_DT'
ORA-06512: at "BUSMASTERQ.HARI_DT", line 5
ORA-04088: error during execution of trigger 'BUSMASTERQ.HARI_DT'
ORA-06512: at "BUSMASTERQ.HARI_DT", line 5
ORA-04088: error during execution of trigger 'BUSMASTERQ.HARI_DT'
ORA-06512: at "BUSMASTERQ.HARI_DT", line 5
ORA-04088: error during execution of trigger 'BUSMASTERQ.HARI_DT'
ORA-06512: at "BUSMASTERQ.HARI_DT", line 5
ORA-04088: error during execution of trigger 'BUSMASTERQ.HARI_DT'
ORA-06512: at "BUSMASTERQ.HARI_DT", line 5
ORA-04088: error during execution of trigger 'BUSMASTERQ.HARI_DT'
ORA-06512: at "BUSMASTERQ.HARI_DT", line 5
ORA-04088: error during execution of triggercan
In this example Oracle ORA-06512 was thrown because the user was trying to
insert a row in the trigger which had to fire before insert. The trigger was
causing itself to fire over and over and get stuck in a loop.
The solution was to remove line that included the insert.
In sum, the fix for the ORA-06512 error is to look at
subsequent error messages for details on the abort.
|