Testing external procedure configuration

How do I test external procedures callouts to see if I've got the listerner.ora and tnsnames.ora configured properly for them?
The Oracle domain indexes used to use external procedures in Oracle8i. Do they still use them in 9i? If I create a little domain index will this test the external procedure configuration?
Kevin Tyson

1. Didn't help.
2. Permissions set for all users on the *.dll file. Still nothing.
[Edit]
I tried setting EXTPROC_DLLS to ANY but nothing changed. In Oracle documentation, I found something about ENVS not being supported on Windows. Is it really the case? As far as I remember, the default listener.ora file contained an ENVS entry. If so, does any one know how to configure the listener properly?
Also, could somebody please comment on the following:
"Oracle Database 11g: PL/SQL Programing" says that external procedures require a separate listener. However, the default listener.ora file looks as follows:
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = CLRExtProc)
(ORACLE_HOME = C:\Program-Files\Oracle11g\product\11.2.0\dbhome_1)
(PROGRAM = extproc)
(ENVS = "EXTPROC_DLLS=ONLY:C:\Program-Files\Oracle11g\product\11.2.0\dbhome_1\bin\oraclr11.dll")
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
ADR_BASE_LISTENER = C:\Program-Files\Oracle11g
My question is: will my computer explode when I append the path to my DLL to the EXPROC_DLLS variable? I know I could see for myself, but maybe there's a pretty good reason why I shouldn't use it like that. I'm a beginner so please don't laugh at me if what I'm saying sounds stupid.

Similar Messages

  • External procedure - configuration problem

    Hi, I am trying to learn to use external procedures with PL/SQL but I have some problems with proper configuration.
    I have created a *.dll library with class WriteStr containing one static method writeStr, which is supposed to write some text to file. Then, I've modified the (formerly default) listener.ora and tnsnames.ora files in the following way:
    #listener.ora
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME = orcl)
    (ORACLE_HOME = C:\Program-Files\Oracle11g\product\11.2.0\dbhome_1)
    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    SID_LIST_CALLOUT_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME = CLRExtProc)
    (ORACLE_HOME = C:\Program-Files\Oracle11g\product\11.2.0\dbhome_1)
    (PROGRAM = extproc)
    (ENVS = "EXTPROC_DLLS=ONLY:C:\Program-Files\Oracle11g\product\11.2.0\dbhome_1\customlib\writestr.dll,C:\Program-Files\Oracle11g\product\11.2.0\dbhome_1\bin\oraclr11.dll,LD_LIBRARY_PATH=C:\Program-Files\Oracle11g\product\11.2.0\dbhome_1\lib")
    CALLOUT_LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = IPC)(KEY = extproc))
    #tnsnames.ora
    LISTENER_ORCL =
    (DESCRIPTION =
    (ADDRESS =
    (PROTOCOL = TCP)
    (HOST = localhost)
    (PORT = 1521)
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = ORCL)
    ORACLR_CONNECTION_DATA =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS =
              (PROTOCOL = IPC)
              (KEY = extproc)
    (CONNECT_DATA =
    (SID = CLRExtProc)
    (PRESENTATION = RO)
    I've double-checked that the path specified in EXTPROC_DLLS does contain the *.dll file (don't be misled by "Program-Files", it's just a junction), and that both listeners are running. Creating the library and procedure wrapper:
    CREATE OR REPLACE LIBRARY library_write_string AS
    'C:\Program-Files\Oracle11g\product\11.2.0\dbhome_1\customlib\writestr.dll'
    CREATE OR REPLACE PROCEDURE write_string
    (path VARCHAR2, message VARCHAR2) AS
    EXTERNAL LIBRARY library_write_string
    NAME "WriteStr::writeStr"
    PARAMETERS (path STRING, message STRING);
    is succesful, however, upon trying to invoke write_string('C:\TEMP\file.txt','Hello, world!'), I get ORA-06520 (error loading external library).
    What could possibly be the problem here? (that it's something with configuration is just my wild guess, if you see no problems above then I might as well have messed up something inside my *.dll file).

    1. Didn't help.
    2. Permissions set for all users on the *.dll file. Still nothing.
    [Edit]
    I tried setting EXTPROC_DLLS to ANY but nothing changed. In Oracle documentation, I found something about ENVS not being supported on Windows. Is it really the case? As far as I remember, the default listener.ora file contained an ENVS entry. If so, does any one know how to configure the listener properly?
    Also, could somebody please comment on the following:
    "Oracle Database 11g: PL/SQL Programing" says that external procedures require a separate listener. However, the default listener.ora file looks as follows:
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME = CLRExtProc)
    (ORACLE_HOME = C:\Program-Files\Oracle11g\product\11.2.0\dbhome_1)
    (PROGRAM = extproc)
    (ENVS = "EXTPROC_DLLS=ONLY:C:\Program-Files\Oracle11g\product\11.2.0\dbhome_1\bin\oraclr11.dll")
    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    ADR_BASE_LISTENER = C:\Program-Files\Oracle11g
    My question is: will my computer explode when I append the path to my DLL to the EXPROC_DLLS variable? I know I could see for myself, but maybe there's a pretty good reason why I shouldn't use it like that. I'm a beginner so please don't laugh at me if what I'm saying sounds stupid.

  • Configure oracle for external procedures

    Hi
    I'm preparing to install 9iAS. I'm trying to configure oracle for external
    procedures. When I tested to see if I have an external procedure listener I
    got a no listener message (below). My tnsnames and listener files are below.
    Can someone comment on what I'm doing wrong ?
    Oracle 8.1.7.0.0 on Windows 2000 SP2
    Thanks
    RC
    D:\oracle\ora81\Apache\Apache\conf>tnsping EXTPROC_CONNECTION_DATA
    TNS Ping Utility for 32-bit Windows: Version 8.1.7.0.0 - Production on
    23-AUG-2001 15:21:56
    (c) Copyright 1997 Oracle Corporation. All rights reserved.
    Attempting to contact (ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC0))
    TNS-12541: TNS:no listener
    D:\oracle\ora81\Apache\Apache\conf>
    +
    listener.ora file
    +
    # LISTENER.ORA Network Configuration File:
    D:\oracle\ora81\network\admin\listener.ora
    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = icimus-xv4iojjv)(PORT = 1526))
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME = PLSExtProc)
    (ORACLE_HOME = D:\oracle\ora81)
    (PROGRAM = extproc)
    (SID_DESC =
    (GLOBAL_DBNAME = ORCL)
    (ORACLE_HOME = D:\oracle\ora81)
    (SID_NAME = ORCL)
    LISTENER_01=
    (DESCRIPTION_LIST=
    (DESCRIPTION=
    (ADDRESS_LIST=
    (ADDRESS= (PROTOCOL= TCP) (HOST = icimus-xv4iojjv) (PORT =
    1526))
    (ADDRESS_LIST=
    (ADDRESS= (PROTOCOL= IPC) (KEY=EXTPROC0))
    +
    tnsnames.ora file
    +
    # TNSNAMES.ORA Network Configuration File:
    D:\oracle\ora81\network\admin\tnsnames.ora
    ORCL =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = icimus-xv4iojjv)(PORT = 1526))
    (CONNECT_DATA =
    (SERVICE_NAME = ORCL)
    INST1_HTTP =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = icimus-xv4iojjv)(PORT = 1526))
    (CONNECT_DATA =
    (SERVER = SHARED)
    (SERVICE_NAME = ORCL)
    (PRESENTATION = http://admin)
    EXTPROC_CONNECTION_DATA =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
    (CONNECT_DATA =
    (SID = PLSExtProc)
    (PRESENTATION = RO)
    null

    Is your listener started. This error normally comes when the listener is not started.
    From cmd prompt try this
    cmd> lsnrctl stat
    if you get this error
    LSNRCTL for 32-bit Windows: Version 8.1.7.0.0 - Production on 24-AUG-2001 16:49:46
    (c) Copyright 1998 Oracle Corporation. All rights reserved.
    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))
    TNS-12541: TNS:no listener
    TNS-12560: TNS:protocol adapter error
    TNS-00511: No listener
    32-bit Windows Error: 2: No such file or directory
    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=incq127e)(PORT=1521)))
    TNS-12541: TNS:no listener
    TNS-12560: TNS:protocol adapter error
    TNS-00511: No listener
    32-bit Windows Error: 61: Unknown error
    that means listerner is not started.
    from cmd prompt or from control panel services run this command
    cmd> lsnrctl start
    and then try the tnsping utilit

  • Problem in Calling External Procedure

    Hello,
    I am trying to call external procedure written in C from PL/SQL.
    Here are the codes :
    For external procedure:
    #include<stdio.h>
    void extproc_fn ( void )
    FILE * file_handle;
    if (( file_handle = fopen ( "/root/cprogs/extproc.out", "a" )) != NULL )
    fwrite ( "External Procedure Testing", 26, 1, file_handle );
    fclose ( file_handle );
    I have created library as :
    create or replace library extproc_lib as '/root/cprogs/extproc.so';
    And the procedure :
    create or replace procedure extproc_proc as
    external
    name "extproc_fn"
    library extproc_lib
    language c;
    My listener and tnsname is configured correctly.
    But when I try to connect to Oracle by that tnsname, extproc program core dumps under $ORACLE_HOME/network/log directory. Under WinNT, it creates a Dr. Watson error.
    Any idea what might have gone wrong.
    Thanks in advance.
    Soumen Ghosh

    hi there,
    everything u did is correct as far as i recollect about external procedures ,the only thing that i suppose is missing is that u forgot to grant permissions on the library to the user...pls check this once i hope this works...
    bye
    Atul

  • Cannot get external procedural call in Oracle RAC Environment

    Cannot get external procedure call to work in our test RAC env.
    We are able to get it to work in our DEV env which is a single instance
    LISTENER.ORA:
    NODE1:
    # listener.ora Network Configuration File: /opt/oracle/app/oracle/product/10.2.0/db_1/network/admin/listener.ora
    # Generated by Oracle configuration tools.
    LISTENER_SBLBGT01 =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = sblbgt01-vip1)(PORT = 1521)(IP = FIRST))
    (ADDRESS = (PROTOCOL = TCP)(HOST = 172.41.1.21)(PORT = 1521)(IP = FIRST))
    (SID_LIST =
    (SID_DESC =
    (SID_NAME = PLSExtProc)
    (ORACLE_HOME = /opt/oracle/app/oracle/product/10.2.0/db_1)
    (PROGRAM = extproc)
    (ENVS="EXTPROC_DLLS=ANY")
    NODE2:
    # listener.ora.sblbgt02 Network Configuration File: /opt/oracle/app/oracle/product/10.2.0/db_1/network/admin/listener.ora.sblbgt02
    # Generated by Oracle configuration tools.
    LISTENER_SBLBGT02 =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = sblbgt02-vip2)(PORT = 1521)(IP = FIRST))
    (ADDRESS = (PROTOCOL = TCP)(HOST = 172.41.1.22)(PORT = 1521)(IP = FIRST))
    (SID_LIST =
    (SID_DESC =
    (SID_NAME = PLSExtProc)
    (ORACLE_HOME = /opt/oracle/app/oracle/product/10.2.0/db_1)
    (PROGRAM = extproc)
    (ENVS="EXTPROC_DLLS=ANY")
    2) ### If you are receiving errors, please list exact error messages and text: ###
    (cont 1.)
    tnsnames.ora (on both nodes):
    EXTPROC_CONNECTION_DATA =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = IPC)(KEY = extproc))
    (CONNECT_DATA = (SID = PLSExtProc) (PRESENTATION = RO)))
    [opt/oracle/app/oracle/product/10.2.0/db_1/network/admin]> tnsping EXTPROC_CONNECTION_DATA
    TNS Ping Utility for Solaris: Version 10.2.0.3.0 - Production on 11-APR-2011 10:52:49
    Copyright (c) 1997, 2006, Oracle. All rights reserved.
    Used parameter files:
    /opt/oracle/app/oracle/product/10.2.0/db_1/network/admin/sqlnet.ora
    Used TNSNAMES adapter to resolve the alias
    Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = IPC)(KEY = extproc)) (CONNECT_DATA = (SID = PLSExtProc) (PRESENTATION = RO)))
    OK (0 msec)
    Calling External Procedure:
    SQL> execute ttran.shell('ls');
    BEGIN ttran.shell('ls'); END;
    ERROR at line 1:
    ORA-28575: unable to open RPC connection to external procedure agent
    ORA-06512: at "TTRAN.SHELL", line 1
    ORA-06512: at line 1

    Any Reply Please...
    would appreciate your help...

  • External Procedure, Error Oracle-03113

    I have configured the database for external procedure: w/ the following:
    # TNSNAMES.ORA
    EXTPROC_CONNECTION_DATA =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = IPC)(Key = epsid))
    (CONNECT_DATA =
    (SID = extproc0)
    # LISTENER.ORA
    EXTERNAL_PROCEDURE_LISTENER =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = IPC)(KEY = epsid))
    SID_LIST_EXTERNAL_PROCEDURE_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (PROGRAM = extproc)
    (SID_NAME = extproc0)
    (ORACLE_HOME = c:\oracle\ora90)
    using the net manager, now when i try to test the extproc_connection_data(service naming) i am getting :
    Attempting to connect using userid: xxxxxxx
    The test did not succeed.
    ORA-03113: end-of-file on communication channel
    There may be an error in the fields entered,
    or the server may not be ready for a connection.
    any help would greatly be appreciated.
    rmp.

    Is your database up? I can get an ORA-3113 when I try to connect to an idle instance.

  • External Procedure & ORA-03113

    I have configured the database for external procedure: w/ the following:
    # TNSNAMES.ORA
    EXTPROC_CONNECTION_DATA =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = IPC)(Key = epsid))
    (CONNECT_DATA =
    (SID = extproc0)
    # LISTENER.ORA
    EXTERNAL_PROCEDURE_LISTENER =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = IPC)(KEY = epsid))
    SID_LIST_EXTERNAL_PROCEDURE_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (PROGRAM = extproc)
    (SID_NAME = extproc0)
    (ORACLE_HOME = c:\oracle\ora90)
    using the net manager, now when i try to test the extproc_connection_data(service naming) i am getting :
    Attempting to connect using userid: xxxxxxx
    The test did not succeed.
    ORA-03113: end-of-file on communication channel
    There may be an error in the fields entered,
    or the server may not be ready for a connection.
    any help would greatly be appreciated.
    rmp.

    oracle uses the default scott /tiger login to test the connection,
    try using the userid / pwd you gave when you installed oracle.. (sysman or sysdba who has full rights )

  • Remote external procedure call ORA-28576

    Hi,
    I have to call an external procedure (c program) which is in another(remote) host system.
    I have created a simple c program and when i call it from the same database host (Oracle 11.2.0.3 in linux 2.6.39) every thing work fine, but when i call it from another database found in a remote host (Oracle 11.2.0.3 HP-UX 11iv3) i receive these error "ORA-28576". The "extproc" program was started by the listener (i can see that in the listener logfile) but then the connection was aborted.
    So my question is can i call remote external proc program from a remote host ? if yes how can i do that ? thanks for help
    Configuration :
    listener.ora
    LISTENER =
      (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = MYHOST)(PORT = 1521))
    SID_LIST_LISTENER =
        (SID_LIST=
            (SID_DESC= (SID_NAME=callout)
            (ORACLE_HOME=/app/oracle/11.2.0.3)
            (ENVS = 'EXTPROC_DLLS=/tmp/test.so')
            (PROGRAM=extproc)
    tnsnames.ora
    extproc_connection_data =
       (DESCRIPTION =
           (ADDRESS = (PROTOCOL=tcp)(host=MYHOST)(port=1521))
           (CONNECT_DATA=(SID=callout))
    test.c
    #include <stdio.h>
    int square(int x)
    return((x*x) + 1); //adds 1 to the return value
    PL/SQL code
    CREATE DATABASE LINK agent_link USING 'extproc_connection_data';
    CREATE OR REPLACE LIBRARY test_lib IS '/tmp/test.so' AGENT 'agent_link';
    CREATE OR REPLACE FUNCTION test_proc (X BINARY_INTEGER) RETURN BINARY_INTEGER
    AS
    EXTERNAL LIBRARY test_lib
    NAME "square"
    LANGUAGE C;
    CREATE OR REPLACE PROCEDURE EXTPROCTEST (X BINARY_INTEGER)
    AS
       RetValue   BINARY_INTEGER;
    BEGIN
       RetValue := test_proc (X);
       DBMS_OUTPUT.PUT_LINE (RetValue);
    END;
    SET SERVEROUTPUT ON
    EXECUTE EXTPROCTEST(10);

    Hi,
    I found the answare, it seem that for security reason the listener,extproc agent and the instance must be on the same host.
    Reference : (http://docs.oracle.com/cd/E11882_01/appdev.112/e10825/pc_07pls.htm#sthref1051)
    >
    The database server, the agent process, and the listener process that spawns the agent process must all reside on the same host.
    >
    >
    For security reasons, extproc, by default, loads only DLLs that are in directory $ORACLE_HOME/bin or $ORACLE_HOME/lib. Also, only local sessions—that is, Oracle Database client processes that run on the same system—are allowed to connect to extproc.

  • ORA-28575: unable to open RPC connection to external procedure agent when trying to connect ORE.connect

    Hello,
    I had installed ore 1.3.1 windows server 2008 on top of Oracle DB 11.2.0.3 ,but when I connect the database,it didn't work.
    That is my code and error code.
    ore.connect(user = "rquser", sid = "db11g", host = "....", password = "....", all = TRUE)
    Got error as below:
    error.oci.GetQuery(conn, statement, data = data, prefetch = prefetch, :
    ORA-28575: unable to open RPC connection to external procedure agent
    ORA-06512: at "RQSYS.RQEVALIMPL", line 17
    ORA-06512: at "RQSYS.RQEVALIMPL", line 14
    ORA-06512: at line 4
    Also i have follwed the below link:
    ///ORE1.3-ore-server-win-x86_64-1.3,error ORA-28575: unable to open RPC connec
    But failed to resolve the problem.
    Below are the TNS and Listener file entry:
    # listener.ora Network Configuration File: F:\OracleDB\product\11.2.0\dbhome_1\network\admin\listener.ora
    # Generated by Oracle configuration tools.
    SID_LIST_LISTENER =
      (SID_LIST =
        (SID_DESC =
          (SID_NAME = EXTPROC)
          (ORACLE_HOME = H:\ORA11G\product\11.2.0\dbhome_1)
          (PROGRAM = extproc)
          (ENVS = "EXTPROC_DLLS=ONLY:H:\ORA11G\product\11.2.0\dbhome_1\bin\oraclr11.dll")
    LISTENER =
      (DESCRIPTION_LIST =
        (DESCRIPTION =
          (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
          (ADDRESS = (PROTOCOL = TCP)(HOST = 10.168.11.69)(PORT = 1521))
    ADR_BASE_LISTENER = H:\ORA11G
    -============================
    # tnsnames.ora Network Configuration File: F:\OracleDB\product\11.2.0\dbhome_1\network\admin\tnsnames.ora
    # Generated by Oracle configuration tools.
    ORACLR_CONNECTION_DATA =
      (DESCRIPTION =
        (ADDRESS_LIST =
          (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
        (CONNECT_DATA =
          (SID = EXTPROC)
          (PRESENTATION = RO)
    DB11G = 
    (DESCRIPTION =   
      (ADDRESS_LIST=
       (ADDRESS = (PROTOCOL = TCP)(HOST = 10.168.11.69)(PORT = 1521)) 
      (CONNECT_DATA =   
        (SERVER = DEDICATED) 
        (SID = DB11G)
    ====================================================
    Thanks
    Sandy

    Hi Sandy,
    If you set EXTPROCS_DLLS=ANY in the listener and then restart the listener, does it fix the problem?
    SID_LIST_LISTENER =
      (SID_LIST =
        (SID_DESC =
          (SID_NAME = EXTPROC)
          (ORACLE_HOME = H:\ORA11G\product\11.2.0\dbhome_1)
          (PROGRAM = extproc)
          (ENVS = "EXTPROC_DLLS=ANY")
    LISTENER =
      (DESCRIPTION_LIST =
        (DESCRIPTION =
          (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
          (ADDRESS = (PROTOCOL = TCP)(HOST = 10.168.11.69)(PORT = 1521))
    Sherry

  • External Procedure call from Trigger

    I'd like to call an external C Procedure from
    an Oracle Trigger.
    In trying to get an example to work, after setting up the listener and tnsnames.ora for external procedures, the following SQL*Plus command behaves strangely:
    CREATE LIBRARY TTest as "c:\winnt\system32\TTrigger.dll";
    After entering this, the command line prompts for more data as if the command was not terminated. Tried single quotes, double quotes, forward slash, backward slash...
    What is wrong with this command?
    Thanks

    hi,
    COuld you send me the configuration parameters for listner and TNSNAMES? I am working so hard to set it up but getting stuck and I am sure that I am missing some configuration set up.
    Please could you mail your tnsname a nd listner files to bellow shown address?
    [email protected] ?
    Thanks in advance
    Suresh

  • ORA-06520 when External Procedure run.

    I need to run a C application that will run an external procedure and I am getting the following errors reported when I run the function call in PL/SQL.
    The test program follows
    declare
    rn number;
    begin
    rn:=wpleca('CUSTCODE PASSTEST');
    END;
    The error that is generated is
    ERROR at line 1:
    ORA-06520: PL/SQL: Error loading external library
    ORA-06522: ld.so.1: extproc: fatal: libgcc_s.so.1: open failed: No such file or directory
    ORA-06512: at "CUSTOM.WPLECA", line 0
    ORA-06512: at line 4
    The C program follows
    #include<stdio.h>
    #include<stdlib.h>
    int sysrun(char *command) {
    int num;
    char str[80];
    strcpy (str, "/xxxx/test/adhoc/syscr/wpleca2unix.sh ");
    strcpy (str,command);
    num = system(str);
    return num;
    The C compile commands follow
    gcc -fPIC -c wpleca.c
    gcc -shared -o libwpleca.so wpleca.o
    The create library command follows
    CREATE OR REPLACE LIBRARY PLECA_LIB
    AS '/xxxx/test/adhoc/syscr/libwpleca.so'
    The create function call follows
    CREATE OR REPLACE FUNCTION wpleca (params_in in varchar2)
    return binary_integer
    as language C
    name "sysrun"
    library pleca_lib
    parameters(params_in string);
    The shared library and the script both exist with approporate permissions
    -rwxr-xr-x 1 root other 5800 Feb 27 14:12 /xxxx/test/adhoc/syscr/libwpleca.so
    -rwxrwxr-x 1 xyz test 1139 Feb 27 14:14 /xxxx/test/adhoc/syscr/wpleca2unix.sh
    Any help with this error would be most appreciated.

    We are getting the error, Has anyone faced this issue, appreciate your help in advance.
    ERROR at line 1:
    ORA-06520: PL/SQL: Error loading external library
    ORA-06522: ld.so.1: extproc: fatal: /tmp/utils.so: wrong ELF class: ELFCLASS32
    while trying to call the external C program
    Steps done for calling external procedure
    1.     Insert entries in the tnsnames.ora and listner.ora at oracle server location
    Tnsnames.ora
    EXTPROC_CONNECTION_DATA =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = IPC) (KEY = extproc_key))
    (CONNECT_DATA = (SID = extproc))
    Listner.ora
    CALLOUT_LISTENER =
    (ADDRESS_LIST =
    (ADDRESS =
    (PROTOCOL = IPC)
    (KEY = extproc_key)
    SID_LIST_CALLOUT_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME = extproc)
    (ORACLE_HOME = /opt/oradba92/OraHome)
    (PROGRAM = extproc)
    (ENVS="EXTPROC_DLLS=ANY")
    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = ctsinpunsun10)(PORT = 1523))
    2.     restart the listener external service
    3.     create library using create library c_utils as ‘/tmp/c_utils.so’
    4.     create sample c program on /tmp location as test.c
    5.     compile c program on unix using cc test.c command
    For compile c program
    $ cc –c util.c command
    Create object file
    $cc –G –c util.c
    Create .so file
    $ld –r –o utils.so util.o
    6.     create object file of above c program using cc –G –c test.c , this command will create new object file as test.o
    7.     after creating the object file , create dynamic link using
    ld –r –o utils.so test.o
    8.     Give the permission to utils.so as 775
    Add “/tmp” path in LD_LIBRARY_PATH
    9.     using sqlplus execute the command “SELECT Plscallscdivisor_Func FROM dual” it will gives error as
    ERROR at line 1:
    ORA-06520: PL/SQL: Error loading external library
    ORA-06522: ld.so.1: extproc: fatal: /tmp/utils.so: wrong ELF class: ELFCLASS32
    Oracle9i Enterprise Edition Release 9.2.0.7.0 - 64bit Production
    Message was edited by:
    user573236

  • Problem with external procedure

    Please,
    i'm doing some experiments in Microsoft Win2003 environment calling a c function as external procedures.
    I've build a sample using Dev-C++ that make a DLL (i don't know c language) named sysDLL.dll
    DllClass::DllClass(char *cmd)
    int num;
    num = system(cmd);
    I need only to execute some OS command from PL/SQL (rdbms 10.2).
    I've putted DLL in $ORACLE_HOME\bin.
    Then I've created library with this statement :
    Create Library scott.c_sysdll as 'C:\oracle\product\10.2.0\db_3\bin\sysdll.dll'
    and at the end I've created the procedure :
    create or replace procedure scott.shell(cmd IN varchar2)
    as language C
    library c_SysDll
    name "DllClass"
    parameters (cmd string);
    But when I execute this procedure from sql*plus I've always get :
    ORA-06521: PL/SQL: Error mapping function
    ORA-06522: Unable to load symbol from DLL
    ORA-06512: at "SCOTT.SHELL", line 1
    ORA-06512: at line 1
    Please help me, thanks !

    Suggest that you first make it much simpler. Do not object orientation. Use plain vanilla flavour C. And even before using C, use a kernel call instead. For example, the gethostname() is a standard Socket call that you will find on many operating system (including Windows & Unix).
    The following code sample illustrates (can be run as is via SQL*Plus):<font color="blue">
    -- specify the external library (shared lib on Unix, DLL on Windows)
    create or replace library libc as 'libc.sl';
    -- The kernel call that we're going to wrap with a PL/SQL function:
    --      int gethostname(char *hostname, size_t size);
    -- wrapping this API call with a PL/SQL function
    create or replace function gethostname( hostname OUT string, size_t binary_integer ) return binary_integer is
            external
            library libc
            name "gethostname"
            language C
            calling standard C
            parameters
                    hostname        STRING,
                    size_t          INT
    -- calling the kernel API routine from within PL/SQL
    set serveroutput on
    declare
            host$   varchar2(60);
            rc$     integer;
    begin
            rc$ := gethostname( host$, 60 );
            dbms_output.put_line( 'hostname is ['|| host$ ||'] return code=['|| TO_CHAR(rc$) || ']' );
    end;
    /</font>
    <p>
    Of course, the DLL name for Window is different than the Shared Library ('libc.sl') used in the above snippet. Do not have a Win32 Oracle platform to test on, but you should find this API call in the winsock.dll library.
    <p>
    As for writing your custom extproc in C. Plain vanilla C is something as follows:
    int dosomestuff()
      return( 123456 );
    <p>
    Remember that this function has to be exported in the DLL interface.
    <p>
    Also keep in mind that using extproc is usually the last option to pursue when dealing with Oracle development. The basic rules are as follows:
    1. Do it in SQL.
    2. If it cannot be done in SQL, do it as a PL/SQL proc
    3. If if cannot be done in PL/SQL. do it as a Java stored proc
    4. If if cannot be done in Java, do is as an external proc<p>
    The times that I need to resort to using Java is less than a handful (most obvious one is using Java to gain o/s command line access). I have never put external proc code into production as we have yet to have a need for something so exceptional, that it cannot be done using SQL, PL/SQL or Java as the last resort.

  • Help me, please ORA-28576: lost RPC connection to external procedure agent

    when i call external program
    SQL>exec shell_all ('/bin/ls /oracle/product/10.2.0/',:result, 3) ;
    BEGIN shell_all ('/bin/ls /oracle/product/10.2.0/',:result, 3) ; END;
    ERROR at line 1:
    ORA-28576: lost RPC connection to external procedure agent
    ORA-06512: at "SYS.SHELL_ALL", line 1
    ORA-06512: at line 1
    and my configure
    #listener.ora
    SID_LIST_LISTENER_AADB02 =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME = PLSExtProc)
    (ORACLE_HOME = /oracle/product/10.2.0/db)
    (PROGRAM = extproc)
    (ENVS = "EXTPROC_DLLS=ANY")
    LISTENER_AADB02 =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = aadb02-vip)(PORT = 1521)(IP = FIRST))
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 203.144.222.82)(PORT = 1521)(IP = FIRST))
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = IPC)(KEY = extproc))
    #tnsname.ora
    EXTPROC_CONNECTION_DATA =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = IPC)(KEY = extproc))
    (CONNECT_DATA =
    (SID = PLSExtProc)
    (PRESENTATION = RO)
    Please tell me to resolve this problem

    Does not execl() and friends replace the current program with the one supplied as a parameter?
    The upshot of this would be as you suggest, viz:
    - Oracle call's your procedure (but doens't wait for a result due to the void return type?)
    - your program executes its code (cd /tmp)
    - it then replaces itself with *program
    - *program terminates
    Presumably, Oracle isn't expecting it to terminate but to continue waiting for subsequent requests.
    I'd check out fork() and see if that offers more appropriate semantics.
    d.

  • I am getting "The contents cannot be displayed in a frame" error when tried to acces an external URL configured through launchpad(ESS). How to rectify it?

    Hi Guys,
    We have configured ESS role through launchpad. For viewing payslips we are using an external URL configured through launchpad.
    But when we try to access the configured link in ESS role, it displays "The contents cannot be displayed in a frame" .
    Should I need to change some parameters/settings in Launchpad so that I could overcome this issue.
    Guidance required,
    Regards,
    Ajeeth Kumar S

    Hi Shankar Reddy Chamala,
    Thanks for the alternate solution.
    But the solution you have provided also ended up with the same error
    "The content cannot be displayed in a frame" error.
    Some additional information so that you could help me out,
    The following is the test report .
    HTTP/1.1 200 OK
    Server: TIN-AppServer
    Strict-Transport-Security: max-age=15552000
    Cache-Control: no-cache, no-store, must-revalidate
    Pragma: no-cache
    Expires: Thu, 01 Jan 1970 00:00:00 GMT
    x-frame-options: DENY
    Content-Type: text/html; charset=UTF-8
    Content-Encoding: gzip
    Content-Length: 2421
    Date: Thu, 15 May 2014 14:23:14 GMT
    Connection: keep-alive
    Vary: Accept-Encoding
    The tester has mentioned the yellow highlighted property may be a cause for this issue.
    I googled that the highlighted property is set by the website owners for security reasons.
    Shankar I have another doubt..
    Is it feasible to create an HTML document to open the external link and link the HTML document to the iview and then configure the custom iview with launchpad.?
    -->If yes can you please elaborate the steps for it.
    Thanks and Regards,
    Ajeeth Kumar S

  • External Procedure Call: Temporary Blob Array out.

    Hello,
    I am having difficulty getting out an array of blob from the external procedure call interface. I am trying to create an array of blob initialized with temporary blobs. I was successfully able to create single blob parameter out but no success with the array type.
    I am including the code for PLSQL wrapper, test code, and the main C code.
    I appreciate your help.
    The error message of the test run:
    0
    10
    DECLARE
    ERROR at line 1:
    ORA-22275: invalid LOB locator specified
    ORA-06512: at "SYS.DBMS_LOB", line 554
    ORA-06512: at line 7
    CREATE OR REPLACE PROCEDURE blob_coll (
    cintarray IN OUT VDC_BLOB_ARRAY ) IS
    LANGUAGE C
    NAME "blob_coll"
    LIBRARY sjc_lib WITH CONTEXT
    PARAMETERS (
    context,
    cintarray OCIColl);
    DECLARE
    BLOBARRAY VDC_BLOB_ARRAY:= VDC_BLOB_ARRAY();
    BEGIN
    dbms_output.put_line( BLOBARRAY.count);
    SCOTT.BLOB_COLL ( BLOBARRAY );
    dbms_output.put_line( BLOBARRAY.count);
    dbms_output.put_line( dbms_lob.getlength( BLOBARRAY(1)));
    END;
    void blob_coll( OCIExtProcContext *ctx,
    OCIColl **cintarray )
    sword status;
    int i;
    OCILobLocator *lobp[10];
    status = OCIExtProcGetEnv( (OCIExtProcContext *)ctx, (OCIEnv **)&envhp,
    (OCISvcCtx **)&svchp, (OCIError **)&errhp );
    for (i=0; i < 10; i++)
    status=OCIDescriptorAlloc( (dvoid *)envhp, (dvoid **) &lobp,
    (ub4)OCI_DTYPE_LOB, (size_t)0, (dvoid**)0);
    status=OCILobCreateTemporary((dvoid *)svchp,
    (dvoid *)envhp,
    lobp[i], (ub2)0, SQLCS_IMPLICIT,
    OCI_TEMP_BLOB, OCI_ATTR_CACHE,
    OCI_DURATION_SESSION);
    status = OCICollAppend( (OCIEnv *)envhp,(OCIError *)errhp,
    (CONST dvoid*) lobp[i],
    (CONST dvoid*)0,
    (OCIColl *)*cintarray);

    The "X" in the second registerOutParameter is the type name which
    you have created in oracle DB.
    eg. if you have created a nested table
    create Type integer_table is table of number(10);
    then "X" = "INTEGER_TABLE" and it has to be in caps
    and other thing to keep in mind is that it only works with nested
    table or varray and not with pl/sql table.
    Al Pivonka (guest) wrote:
    : How can I pass pl/sql record in and out
    : and pl/sql tables in out thru a pl/sql procedure using jdbc
    with
    : the zip file of 816classes12.zip...
    : I have tried everything I know...
    : I know the procedure is working, others are using it with in
    : Oracle...
    : I need to use the information it generates.
    : here is what I have so far...
    : try
    : Class.forName ("oracle.jdbc.driver.OracleDriver");
    : DriverManager.registerDriver (new
    : oracle.jdbc.driver.OracleDriver());
    : oracle.jdbc.driver.OracleConnection conn =
    : (oracle.jdbc.driver.OracleConnection
    : DriverManager.getConnection
    ("jdbc:oracle:thin:@--","NA","NA");
    : // SQL92 SyntaxCallableStatement
    : oracle.jdbc.driver.OracleCallableStatement cstmt =
    : (oracle.jdbc.driver.OracleCallableStatement)conn.prepareCall
    : ("{call cbmd_proposal_PKG.DefaultTerms (?,?,?,?)}" ) ;
    : cstmt.setString(1,"5118");
    : cstmt.setString(2,"3");
    : cstmt.registerOutParameter
    : (2,oracle.jdbc.driver.OracleTypes.NUMBER);
    : cstmt.registerOutParameter
    (1,oracle.jdbc.driver.OracleTypes.ARRAY,"X");
    : cstmt.execute();
    : catch(Exception e)
    : System.err.println(e.toString());
    : e.printStackTrace();
    : The "X" in the second registerOutParameter is still unknown to
    : me.
    : The JavaDoc for the
    OracleCallableStatement.registerOutParameter
    : is not clear.
    : Can any One help simplify this...
    : Thanks
    null

Maybe you are looking for