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 -> External procedures problem

External procedures problem

From: Michail V. Samoylov <mihael_at_caravan.ru>
Date: Thu, 23 Nov 2000 19:05:58 +0300
Message-ID: <8vjf7m$pq2$1@news.omsk.su>

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:05:58 CST

Original text of this message

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