Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Who's calling who??
Come on you guys, can't anyone answer this? Sybrand, Richard, Howard,
Niall, et al
here's a better picture (for some reason my ascii art had \n's):
Box1 Box2 ---- ----
"Jake" <me_at_heyjay.com> wrote in message
news:apnoao$gks$1_at_bob.news.rcn.net...
> I need a pointer
>
>
>
> I have the following setup:
>
>
>
> Box1 Box2
>
> ---- ----
>
> c1-- db1 --dblink-- db3
>
> c2-- db2 --dblink --/
>
>
> that is box1 has 2 databases, each having dblinks to db3. Clients can
> connect to either db on box1. In db1 and db2 there is a view which points
> to db3 (create view myview as select * from remotetable_at_db3). On
> remotetable there is a before insert trigger. I'd like to capture which
db
> the insert originated at and stick that value in the remotetable.
>
> I can't change the code on db1 or db2!
>
> How can I determine the dbname (or anything else indicative) for the
calling
> db. Using SYS_CONTEXT('USERENV','IP_ADDRESS') I can determine the IP
> address of the caller, but that doesn't help me because there are more
than
> one database at the IP. All the other sys_context attributes give me info
> from db3.
>
> Are there some other sql functions, pl/sql function I can use?
> Help?
>
> Thanks
> Jake
>
>
Received on Wed Oct 30 2002 - 08:00:43 CST