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: cannot find source of error compiling procedure.

Re: cannot find source of error compiling procedure.

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: 28 Feb 2002 11:49:26 -0800
Message-ID: <a5m1k602mua@drn.newsguy.com>


In article <3c7e4ac0.154818006_at_ausnews.austin.ibm.com>, Ed_Stevens_at_nospam.noway.nohow says...
>
>Platform: Oracle 8.0.5 SE on NT 4, sp6
>
>I'm building a test version of one of our production db's. I did a "schema
>extraction" to get all of the tables, indexes, procedures, etc. from a
>particular schema. When I executed this DDL on the test database, everything
>went will except for compiling a few of the procedures. On the procedures, I
>got the error "ORA-04054: database link LN_NMMPDB.WORLD does not exist"
>
>OK, that refers to a link to a production database, so I'll just change to
>reference to point to the proper link in the test environment. BUT . . . I
>can't find any occurance of the string "LN_NMMPDB" anywhere in the DDL!
>
>So if the DDL has no mention of LN_NMMPDB, why would the compile fail because
>LN_NMMPDB does not exist?
>
>Sitting on a park bench, feeding the birds and drooling on myself is looking
>better all the time . . .
>
>
>--
>Ed Stevens
>(Opinions expressed do not necessarily represent those of my employer.)

perhaps a synonym used in the code hides the existence of the dblink.

ops$tkyte_at_ORA817DEV.US.ORACLE.COM>
ops$tkyte_at_ORA817DEV.US.ORACLE.COM> create synonym foobar for t_at_does_not_exist;

Synonym created.

ops$tkyte_at_ORA817DEV.US.ORACLE.COM>
ops$tkyte_at_ORA817DEV.US.ORACLE.COM> create or replace procedure p   2 as
  3 begin

  4     for x in (select * from foobar) loop
  5       null;
  6     end loop;

  7 end;
  8 /
create or replace procedure p
*
ERROR at line 1:
ORA-04054: database link DOES_NOT_EXIST.US.ORACLE.COM does not exist
--
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 Thu Feb 28 2002 - 13:49:26 CST

Original text of this message

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