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

Home -> Community -> Usenet -> c.d.o.misc -> Re: db link doesn't work within a trigger

Re: db link doesn't work within a trigger

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: 22 Oct 2001 06:38:56 -0700
Message-ID: <9r17hg02t6i@drn.newsguy.com>


In article <adee11fe.0110220120.42ed0965_at_posting.google.com>, mike.haegele_at_btignite.de says...
>
>Hello,
>
>I've tried to use a db link within a trigger and it doesn't work.
>Optionaly I've wrote a stored procedure with the db link call and used
>this procedure with the trigger and it doesn't work too.
>If I test the db link with a single sql statement it works.
>
>Has anybody any suggestion?
>
>Thanks in advance,
>
>Mike

sounds like you are not using PROXY database link perhaps (you know, the command you used to create the database link would help as would versions of software used and platforms you are on. A definition of "doesn't work" is handy as well -- getting an error? what is the error? getting the wrong answer? tell us what you expected and what you got.... and so on)

If you are not using a proxy link, the username/password is picked up from whomever happens to be logged in -- that could be the cause of your problem and why is works when YOU run a sql statement in plus but doesn't work when someone else fires the trigger or runs the procedure.

--
Thomas Kyte (tkyte@us.oracle.com)             http://asktom.oracle.com/ 
Expert one on one Oracle, programming techniques and solutions for Oracle.
http://www.amazon.com/exec/obidos/ASIN/1861004826/  
Opinions are mine and do not necessarily reflect those of Oracle Corp 
Received on Mon Oct 22 2001 - 08:38:56 CDT

Original text of this message

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