How to identify the caller within a plsql block
Hi All,
I have a PL/SQL procedure (p1) and I need to identify in runtime the "very first" caller of it. I mean:
user1.p1 is called by user2.p2 is called by user3.p3 and
user1.p1 is called by user4.p4 is called by user5.p5
Now I need user2 or user4.
If I use SYS_CONTEXT ('USERENV', '%') either with SESSION_USER or CURRENT_SCHEMA, it gives me user3 or user5.
- or -
Is it possible to identify the role if p1 was granted to user2 and user4 via roles.
Thanks a lot.
user1.p1 is called by user2.p2 is called by user3.p3 and
user1.p1 is called by user4.p4 is called by user5.p5
Now I need user2 or user4.
If I use SYS_CONTEXT ('USERENV', '%') either with SESSION_USER or CURRENT_SCHEMA, it gives me user3 or user5.
- or -
Is it possible to identify the role if p1 was granted to user2 and user4 via roles.
Thanks a lot.
0