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 -> Finding database link connection origin

Finding database link connection origin

From: <n.a.ekern_at_usit.uio.no>
Date: 9 Jan 2002 18:49:53 GMT
Message-ID: <a1i3ch$a9q$1@readme.uio.no>


Hi all.

We are using Oracle 8.1.7 databases.

I am wondering, if a database DB1 is accessed over a database link, is there any way to find out the following:

The database from which the database link connection is coming from.

If there is, I am planning on having a logon trigger logging this, and maybe deny the logon.

I have looked in v$session but could not find it there. I also tested the following:

Created a function in the DB1 database under username test: create or replace function testcallstack return varchar2
is
begin
return dbms_utility.format_call_stack;
end;
/

Executing it from inside DB1 gives the following result: variable callstack varchar2(4000)
exec :callstack:=testcallstack
print :callstack

But executing from another database like this:

Create database link db1 connect to test identified by testpw using'db1'; variable callstack varchar2(4000)
exec :callstack:=testcallstack_at_db1
print :callstack

gives NULL as result.

I would appreciate very much any tip on how to find the identity of the foreign database.

Tia,
Njål Ekern
n.a.ekern_at_usit.uio.no
naekern_at_hotmail.com Received on Wed Jan 09 2002 - 12:49:53 CST

Original text of this message

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