Is it possible to detect the calling database that accessed a function over a dblink? I have package on a remote database that needs to detect who called it.
For clarity, consider a remote DB we'll call RDB that has package x and a function main.
On a staging DB, I make this call:
v_return := x.main()@RDB;
Back on the remote DB, I need to be able to detect that it came from the staging DB.
I tried to use who_called_me, but was unsuccessful:
All four variables come back null. So I'm not sure what else to try. Any help is much appreciated!
Thanks,
Mike
For clarity, consider a remote DB we'll call RDB that has package x and a function main.
On a staging DB, I make this call:
v_return := x.main()@RDB;
Back on the remote DB, I need to be able to detect that it came from the staging DB.
I tried to use who_called_me, but was unsuccessful:
Code:
FUNCTION main RETURN VARCHAR2 IS
v_owner VARCHAR2(50);
v_name VARCHAR2(50);
v_line VARCHAR2(50);
v_caller VARCHAR2(50);
BEGIN
owa_util.who_called_me(v_owner, v_name, v_line, v_caller);
RETURN v_caller;
END main;
All four variables come back null. So I'm not sure what else to try. Any help is much appreciated!
Thanks,
Mike