Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Getting Identity of Calling Schema
I'd be grateful for your suggestions on the following problem:
Before:
We have a schema s1 in database d1 containing procedure p1. This
procedure is called by various users. p1, among other things, calls
procedure p2 belonging to schema s2 in database d2. However, it does
this call via a database link using user s3 in database d2, who has
execute permission on p2. So when p2 checks the USER variable, which
it does, it always returns 's3' (when it is called by p1). So we
enforce the rule: no matter what user is calling p1, when p1 calls p2,
it does so as user s3 (USER='s3').
Now:
We have moved the schema s2 to database d1. p1 calls procedure p2, but
through a public synonym. Is there anyway, apart from logging on again
or passing something as a parameter, for p2 to know that it is being
called by p1?
Now that I put it like this, I'm sure the answer is no, but I'll ask anyway!
Salaam Received on Wed Feb 19 2003 - 12:54:32 CST