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 -> Determining calling database via dblink

Determining calling database via dblink

From: Jake <me_at_heyjay.com>
Date: Mon, 26 Aug 2002 19:21:34 -0500
Message-ID: <akegk8$bjl$1@bob.news.rcn.net>


Hi,

I have a setup where I have 2 remote databases and a local database. I have table1 on my local database, table1 has a before insert trigger which calls a function. My remote databases have views which are simple select * from table1_at_local_db.

How can I determine which database is inserting to table1?

Ideally, I'd like to use something like sys_context and get the global_name of the database which initiated the transaction. I thought of using SYS_CONTEXT ('USERENV','IP_ADDRESS'), but then that will require I keep a list of IP addresses and do the crossref, and if we move a server I'll forget and my app will blow up. Furthermore (since I haven't had a chance to test this yet) I don't even know if I'll get the remote db's IP in this situation.

Any ideas? Help?

Thanks
J Received on Mon Aug 26 2002 - 19:21:34 CDT

Original text of this message

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