PL/SQL (MOSC)

MOSC Banner

ORA-64610: bad depth indicator when using Utl_Call_Stack

edited Nov 9, 2018 6:51AM in PL/SQL (MOSC) 2 commentsAnswered

Hello folks,

I have an Oracle 12.2.0 database

There I have a PL/SQL logic which is called from an update trigger.

From this logic, following code segment is called to get the format call stack.

FUNCTION Format_Stack___ RETURN VARCHAR2

   IS

      call_stack_ VARCHAR2(32000);

      depth_ PLS_INTEGER := Utl_Call_Stack.Dynamic_Depth();

   BEGIN

      FOR i_ IN REVERSE 1 .. depth_ LOOP

         call_stack_ := call_stack_ || UTL_Call_Stack.Concatenate_Subprogram(UTL_Call_Stack.Subprogram(i_)) || ' at line ' || To_Char(UTL_Call_Stack.Unit_Line(i_)) || chr(10);

      END LOOP;

      RETURN stack_;

   END Format_Stack___;

Running this code segment raises the ORA-64610: bad depth indicator

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