Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Is there a way to get all called nested procedures or functions in one procedure or function?

ronald_2017Jan 3 2023 — edited Jan 3 2023

Hello All,

In Oracle 12c, is there a way to get all nested procedure all functions that called in a spesific procedure or function.
For example: I want to list all called procedures or functions inside proc_1.
I guess it can be done by PL/SCOPE.

proc_1 ----> level(0)
    proc_2 ----> level(1)
        func_2 ----> level(2)
    func_1 ---> level(1)
begin
    proc_1();
end;


procedure proc_1
is
    v_num number;
begin
    proc_2();
    v_num := func_1();
end proc_1;


procedure proc_2
is
    v_num number;
begin
    v_num := func_2();
end proc_2;


function func_1(p1 number)
return number
is
begin
    return p1 * 2;
end func_1;


function func_2(p1 number)
return number
is
begin
    return p1 * 3;
end func_2;

Thanks in advance.

Comments
Post Details
Added on Jan 3 2023
10 comments
547 views