PL/SQL (MOSC)

MOSC Banner

How to identify the caller within a plsql block

edited Oct 8, 2009 3:17AM in PL/SQL (MOSC) 8 commentsAnswered
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.

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