Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Getting Identity of Calling Schema
Hi,
Look for dbms_utility.FORMAT_CALL_STACK from metalink or groups, you'll find an example for sure..
Tanel.
"Salaam Yitbarek" <yitbsal_at_yahoo.com> wrote in message
news:77439c33.0302191054.6e0f3da1_at_posting.google.com...
> 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 - 14:51:32 CST
![]() |
![]() |