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

Home -> Community -> Usenet -> c.d.o.tools -> Re: External procedures problem

Re: External procedures problem

From: TimKArnold <timkarnold_at_aol.com>
Date: 23 Nov 2000 16:56:15 GMT
Message-ID: <20001123115615.23166.00001246@ng-fv1.aol.com>

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
>
>
>
Received on Thu Nov 23 2000 - 10:56:15 CST

Original text of this message

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