Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Who's calling who??

Re: Who's calling who??

From: Brian Peasland <oracle_dba_at_peasland.com>
Date: Thu, 31 Oct 2002 15:19:46 GMT
Message-ID: <3DC14A12.BABE95C1@peasland.com>


Have you looked into the DBMS_APPLICATION_INFO package. I haven't had a chance to see how it looks from the other side of a DB link yet so I'm a little unsure if it will help you or not.

HTH,
Brian

Jake wrote:
>
> 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 Thu Oct 31 2002 - 09:19:46 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US