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: DBlink problem

Re: DBlink problem

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Wed, 19 May 1999 06:42:51 +0200
Message-ID: <927088856.20258.0.pluto.d4ee154e@news.demon.nl>


Hi Gennaro,
Try querying the link in the dictionary. Upon creation the value of db_domain is automatically added to the link name. Most likely the link name in the dictionary will be 'mylink.world'. Sql*plus automatically seems to add db_domain to all statements with link, while PL/SQL doesn't seem to do that. So in PL/SQL your link name needs to be fully qualified and referenced as 'mylink.world'. If I am correct, I am afraid using dbms_sql wouldn't resolve the issue either.

Hth,

Sybrand Bakker, Oracle DBA

Gennaro Napolitano wrote in message <374186B0.DC330C89_at_sbsitalia.it>...
>Hy all
>
>I have a problem with a stored procedure that use a dblink.
>
>My procedure is:
>...
>create public database link mylink connect to ccc identified by ccc
>using 'cc';
>...
>then I use the dblink in a static statement:
>INSERT INTO mytab (select * from remote_tab_at_mylink)
>
>during the compilation I receive the error:
>ORA-04054: database link MYLINK does not exist
>
>I know that I can use the dbms_sql package to avoid this error, but my
>question is there is no way to force only a syntax and not the semantics
>check at compilation time?
>Something like the SQLCHECK precompiler directive for the Pro*C
>compiler.
>
>Thanks a lot in advance
>
>Ciao Gennaro
>
>
>
Received on Tue May 18 1999 - 23:42:51 CDT

Original text of this message

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