Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: External procedures problem
> make sure you have listener.ora
> and tnsnames.ora entries for external procedures.
>
> >Hi all,
> >
> >I have a problem with external procedures call.
> >
> >File test.sql contains the following:
> >
> >CREATE OR REPLACE LIBRARY libcrypt IS '/tmp/libcrypt_i.so.1';
> >/
> >CREATE OR REPLACE
> >FUNCTION crypt(
> >Customer_Password IN VARCHAR2
> >)
> >RETURN VARCHAR2
> >IS
> >Result VARCHAR2(40);
> >BEGIN
> > Result := sys_crypt(Customer_Password,Gen_Salt);
> > return Result;
> >END;
> >/
> >CREATE OR REPLACE
> >FUNCTION sys_crypt
> >( key_arg IN VARCHAR2 ,
> > salt_arg IN VARCHAR2 )
> >RETURN VARCHAR2
> >IS EXTERNAL
> >LIBRARY libcrypt
> >NAME "crypt"
> >PARAMETERS ( key_arg STRING,
> > salt_arg STRING);
> >/
> >SET SERVEROUTPUT ON
> >BEGIN
> > DBMS_OUTPUT.ENABLE;
> > DBMS_OUTPUT.PUT_LINE( crypt('Rfpfxjr') );
> >END;
> >/
> >
> >When I try to execute this file under sqlplus with following method - all
> >works fine:
> >bash-2.03# sqlplus
> >SQL*Plus: Release 8.1.5.0.0 - Production on Thu Nov 23 18:37:39 2000
> >(c) Copyright 1999 Oracle Corporation. All rights reserved.
> >Enter user-name: test
> >Enter password:
> >Connected to:
> >Oracle8i Enterprise Edition Release 8.1.5.0.0 - Production
> >With the Partitioning and Java options
> >PL/SQL Release 8.1.5.0.0 - Production
> >SQL> @test.sql
> >Library created.
> >Function created.
> >Function created.
> >hgni9gpqHNGLs
> >PL/SQL procedure successfully completed.
> >
> >But when I try to execute this file by following method - it's not work:
> >bash-2.03# sqlplus test/test_at_test
> >SQL*Plus: Release 8.1.5.0.0 - Production on Thu Nov 23 18:38:18 2000
> >(c) Copyright 1999 Oracle Corporation. All rights reserved.
> >Connected to:
> >Oracle8i Enterprise Edition Release 8.1.5.0.0 - Production
> >With the Partitioning and Java options
> >PL/SQL Release 8.1.5.0.0 - Production
> >
> >SQL> @test.sql
> >Library created.
> >Function created.
> >Function created.
> >BEGIN
> >*
> >ERROR at line 1:
> >ORA-28575: unable to open RPC connection to external procedure agent
> >ORA-00000: normal, successful completion
> >ORA-00000: normal, successful completion
> >ORA-06512: at "TEST.SYS_CRYPT", line 0
> >ORA-06512: at "TEST.CRYPT", line 8
> >ORA-06512: at line 3
> >
> >
> >May be anyone know this problem?!
> >
> >Thanks in advance,
> > Mihael Samoylov
> > mihael_at_caravan.ru
> >
> >
> >
>
>
>
I checked those files.
listener.ora contains follow:
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = sun.caravan.ru)(PORT = 1521)) ) (ADDRESS_LIST = (ADDRESS = (PROTOCOL=IPC)(HOST = sun.caravan.ru)(KEY = extprocO)) )
(SID_NAME = test) (ORACLE_HOME = /opt/oracle/app/oracle/product/8.1.5))
(SID_NAME = PLSExtProc) (ORACLE_HOME = /opt/oracle/app/oracle/product/8.1.5) (PROGRAM = extprocO)
File tnsnames.ora contains follow:
TEST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = sun.caravan.ru)(PORT = 1521))
)
(CONNECT_DATA =
(SID = TEST)
)
)
EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = extprocO))
(CONNECT_DATA = (SID = PLSExtProc))
)
Thanks in advance,
Mihael Samoylov mihael_at_caravan.ruReceived on Fri Nov 24 2000 - 02:00:05 CST
![]() |
![]() |