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: Trigger via DatabaseLink

Re: Trigger via DatabaseLink

From: Niall Litchfield <n-litchfield_at_audit-commission.gov.uk>
Date: Fri, 20 Feb 2004 14:42:53 -0000
Message-ID: <40361cee$0$10333$ed9e5944@reading.news.pipex.net>


at a wild guess your db domain is salzburg-ag.at and you have global names=true? The hyphen character is illegal in db-domain names and from 9i some procedures (maybe all pl/sql) checks this, but vanilla sql doesn't. We had the same problem with a snapshot refresh.

-- 
Niall Litchfield
Oracle DBA
Audit Commission UK
"AndyR" <andreas.rothenwaender_at_salzburg-ag.at> wrote in message
news:XMrYb.27$Zn.293998_at_news.salzburg-online.at...

> Hi folks,
>
> I've got a strange problem. I try to forward data from my local 9i to a
> remote 8i via a trigger by use of a dblink.
>
> So I did
>
> CREATE PUBLIC DATABASE LINK myLink CONNECT TO user IDENTIFIED BY pwd USING
> 'host';
>
> CREATE OR REPLACE TRIGGER myTrigger AFTER INSERT ON myTable FOR EACH ROW
> DECLARE
> rID NUMBER;
> BEGIN
> SELECT remoteID INTO rID FROM conversiontable WHERE localID = :NEW.id;
>
> INSERT INTO remoteTable_at_myLink (dt,id,value) VALUES (:NEW.dt, rID,
> :NEW.value);
> END;
>
> In SQLPlus the above insert works. But when I execute the CREATE TRIGGER I
> get
>
> ORA-02083: database name has illegal character '-'
>
> at the position after INSERT INTO.
>
> When I looked on the internet several sources stated that this syntax
should
> work.
> A possible work around might be a synonym but why does it not work as
> is?!!!???!??!
>
>
> Thanks
>
> AndyR
>
>
Received on Fri Feb 20 2004 - 08:42:53 CST

Original text of this message

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