External procedure problem

Hi all
I tried to start shell script from database using external procedure (I would like to learn about external proc ).
1. I used c program and than :
xlc -G -c oracle_host.c
ld -r -o oracle_host.so oracle_host.o
chmod 755 oracle_host.so ### prava
export OBJECT_MODE=64
make -f demo_rdbms.mk extproc_no_context SHARED_LIBNAME=/oracle/lib/oracle_host.so OBJS=/oracle/lib/oracle_host.o
and error :
make: 1254-002 Cannot find a rule to create target extproc_no_context from
dependencies.
db version 10.2.0.3
os AIX 5.3 ml9
when I tried it in another env wirh 10.2.0.3 on AIX 5.3 ml6 al work ok
Can You help me where I do mistake
Thank You Brano
Edited by: branislav.dobrotka on Mar 5, 2009 10:41 PM

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

  • OS Authentication problems during external procedure calls

    Hi,
    Here's our setup: Oracle 9i on Windows OS
    1. Created an OS ID = TESTID on domain = MYDOMAIN
    MYDOMAIN\TESTID
    2. Granted the necessary OS rights on MYDOMAIN\TESTID and assigned it to start/stop the external procedure listener service. The ID has "deny logon locally" policy applied to it on Windows OS.
    3. Restarted the external procedure listener service so that the changes would take effect.
    4. Created an ID on the Oracle DB as OPS$MYDOMAIN\TESTID (identified externally)
    5. Assigned the necessary DB privs to the ID (including create session)
    6. Set the registry entry:
    HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\HOME0\OSAUTH_PREFIX_DOMAIN = TRUE
    7. On one of our application modules (oracle forms) we triggered an external procedure call and it failed with:
    ORA-01017: invalid username\password
    We used to call the same external procedure before and we never had problems with it. The setup before was that the IDs are on the local server. We had to move the server to MYDOMAIN which is why we did the steps listed above.
    I don't have a clue why the external procedure calls keeps on failing with the new setup. Need your advise on this.
    Below are some of our DB init parms:
    remote_login_password_file = EXCLUSIVE
    remote_os_authent = FALSE
    remote_os_roles = FALSE
    os_authent_prefix = OPS$
    thanks.

    I don't remember noticing an option to set how many passes it will go through. There were two options - you can either write zeros to the drive or do the 8-way random write, where it writes random data across the drive in a random pattern 8 times.
    If there is an amount of passes you can set with the zeros, I did whatever the default one is.
    It's 4:13 now. If it hasn't moved by 5, should I shut down and try again when I return to work tomorrow?
    Jason

  • 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.

  • 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

  • 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.

  • Problem with Oracle external procedures and Microsoft Active Directory

    Hi,
    Our server was recently updated to use Microsoft Active Directory. However, we noticed that all external procedure calls keeps on failing with ORA-28575: unable to open RPC connection external procedure agent. Everything was working fine before we migrated to Active Directory which is why we can say that the listener is configured correctly.
    Any idea on how we can make extproc calls with Active Directory?
    thanks.

    Michael,
    Oracle Forms does support Single Sign-On (SSO). Take a look at Oracle Containers for J2EE Security Guide: OC4J Java Single Sing-On. Also take a look at the Oracle Forms 10g Sample Code and scroll to the SSO demo under the Forms Services Demo section. There are also, numerous other documents available via Google. ;-)
    Craig B-)
    If someone's response is helpful or correct, please mark it accordingly.

  • 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

  • SQL Developer and External Procedures not in tree.

    Does sql Dveloper add external procedures to the object browser tree? I have SQL Developer 1.5 and if you have external procedures/functions before your regular PLSQL objects they will not display in the tree. I can make the tree work but the tree still doesn't capture the externals. Am I doing something wrong or should this be a feature request?
    VSAMPLE1 shows the problem.
    VSAMPLE2 is a try to resolve...
    /* the problem.. */
    CREATE OR REPLACE package VSAMPLE_1 IS
         PROCEDURE foobar(feedname IN VARCHAR2);
    END VSAMPLE_1;
    CREATE OR REPLACE PACKAGE BODY VSAMPLE_1
    IS
         * Function Name:- canread
         * Description  :-This function checks the file will give any error or not while reading
         FUNCTION canread (FILE IN VARCHAR2)
              RETURN NUMBER AS LANGUAGE JAVA NAME 'com.myCompany.myApp.bulk.FileUtil.canRead (java.lang.String) return int';
         * Function Name:- is_exist
         * Description  :-This function checks the existance of the filein the required folder
         FUNCTION is_exist (FILE IN VARCHAR2)
              RETURN NUMBER AS LANGUAGE JAVA NAME 'com.myCompany.myApp.bulk.FileUtil.exists (java.lang.String) return int';
         * Function Name:- isDirectory
         * Description  :-This function checks the name provided by the user is a directory or not
         FUNCTION isDirectory (FILE IN VARCHAR2)
              RETURN NUMBER AS LANGUAGE JAVA NAME 'com.myCompany.myApp.bulk.FileUtil.isDirectory (java.lang.String) return int';
         * Function Name:- isFile
         * Description  :-This function checks the name provided by the user is a file or not
         FUNCTION isFile (FILE IN VARCHAR2)
              RETURN NUMBER AS LANGUAGE JAVA NAME 'com.myCompany.myApp.bulk.FileUtil.isFile (java.lang.String) return int';
         * Function Name:- isExist
         * Description  :-This function checks the existance of file,correctness of the directory provided by the user.
         * @Param file_name :- File Name in directory
         * @return retcode  :- Error checking while uploading the feed.
         FUNCTION isExist(file_name IN VARCHAR2,
                    is_dir       BOOLEAN)
              RETURN PLS_INTEGER
         IS
              retcode PLS_INTEGER := -1;
              v_errcode PLS_INTEGER;
              v_errtext      VARCHAR2(1000);
              l_section_name VARCHAR2(32) := 'isExist ' ;
         BEGIN
              IF VTMLOG.isDebugEnabled THEN
                   VTMLOG.debug(l_section_name,$$PLSQL_LINE, 'Checking existense of '||file_name);
              END IF;
              retcode   := is_exist(file_name);
              IF retcode = 1 THEN
                   IF is_dir THEN
                        retcode := isDirectory(file_name);
                   ELSE
                        retcode := isFile(file_name);
                   END IF;
                   IF retcode          = 1 THEN
                        retcode    := canread(file_name);
                        IF retcode != 1 THEN
                             VTMLOG.error(l_section_name,$$PLSQL_LINE, ' Can not read ' || file_name);
                        END IF;
                   ELSE
                        VTMLOG.error(l_section_name,$$PLSQL_LINE, ' Unable to check if ' || file_name || ' is directory or file ');
                   END IF;
              ELSE
                   VTMLOG.error(l_section_name,$$PLSQL_LINE, file_name || ' does not exist ');
              END IF;
              VTMLOG.debug(l_section_name,$$PLSQL_LINE, 'Leaving ' );
              RETURN retcode;
         EXCEPTION
         WHEN OTHERS THEN
              VTMLOG.SHOW_ERROR_MESSAGE(l_section_name,$$PLSQL_LINE);
              RAISE;
         END isExist;
         PROCEDURE foobar(feedname VARCHAR2)
         IS
                    retval PLS_INTEGER;
            BEGIN
              /* implementation omitted */
              retval := isExist('feed.txt',false);
         EXCEPTION
              WHEN OTHERS THEN
                   RAISE;
         END foobar;
    END VSAMPLE_1;
    /* This version at least shows the tree. But I can't reach the external by clicking in the navigation tree just the placeholders */
         PROCEDURE foobar(feedname IN VARCHAR2);
    END VSAMPLE_2;
    CREATE OR REPLACE PACKAGE BODY VSAMPLE_2
    IS
            FUNCTION canread (FILE IN VARCHAR2) RETURN NUMBER;
            FUNCTION is_exist (FILE IN VARCHAR2) RETURN NUMBER;
            FUNCTION isDirectory (FILE IN VARCHAR2) RETURN NUMBER;
            FUNCTION isFile (FILE IN VARCHAR2) RETURN NUMBER;
         * Function Name:- isExist
         * Description  :-This function checks the existance of file,correctness of the directory provided by the user.
         * @Param file_name :- File Name in directory
         * @return retcode  :- Error checking while uploading the feed.
         FUNCTION isExist(file_name IN VARCHAR2,
                    is_dir       BOOLEAN)
              RETURN PLS_INTEGER
         IS
              retcode PLS_INTEGER := -1;
              v_errcode PLS_INTEGER;
              v_errtext      VARCHAR2(1000);
              l_section_name VARCHAR2(32) := 'isExist ' ;
         BEGIN
              IF VTMLOG.isDebugEnabled THEN
                   VTMLOG.debug(l_section_name,$$PLSQL_LINE, 'Checking existense of '||file_name);
              END IF;
              retcode   := is_exist(file_name);
              IF retcode = 1 THEN
                   IF is_dir THEN
                        retcode := isDirectory(file_name);
                   ELSE
                        retcode := isFile(file_name);
                   END IF;
                   IF retcode          = 1 THEN
                        retcode    := canread(file_name);
                        IF retcode != 1 THEN
                             VTMLOG.error(l_section_name,$$PLSQL_LINE, ' Can not read ' || file_name);
                        END IF;
                   ELSE
                        VTMLOG.error(l_section_name,$$PLSQL_LINE, ' Unable to check if ' || file_name || ' is directory or file ');
                   END IF;
              ELSE
                   VTMLOG.error(l_section_name,$$PLSQL_LINE, file_name || ' does not exist ');
              END IF;
              VTMLOG.debug(l_section_name,$$PLSQL_LINE, 'Leaving ' );
              RETURN retcode;
         EXCEPTION
         WHEN OTHERS THEN
              VTMLOG.SHOW_ERROR_MESSAGE(l_section_name,$$PLSQL_LINE);
              RAISE;
         END isExist;
         PROCEDURE foobar(feedname VARCHAR2)
         IS
                    retval PLS_INTEGER;
            BEGIN
              /* implementation omitted */
              retval := isExist('feed.txt',false);
         EXCEPTION
              WHEN OTHERS THEN
                   RAISE;
         END foobar;
         * Function Name:- canread
         * Description  :-This function checks the file will give any error or not while reading
         FUNCTION canread (FILE IN VARCHAR2)
              RETURN NUMBER AS LANGUAGE JAVA NAME 'com.myCompany.myApp.bulk.FileUtil.canRead (java.lang.String) return int';
         * Function Name:- is_exist
         * Description  :-This function checks the existance of the filein the required folder
         FUNCTION is_exist (FILE IN VARCHAR2)
              RETURN NUMBER AS LANGUAGE JAVA NAME 'com.myCompany.myApp.bulk.FileUtil.exists (java.lang.String) return int';
         * Function Name:- isDirectory
         * Description  :-This function checks the name provided by the user is a directory or not
         FUNCTION isDirectory (FILE IN VARCHAR2)
              RETURN NUMBER AS LANGUAGE JAVA NAME 'com.myCompany.myApp.bulk.FileUtil.isDirectory (java.lang.String) return int';
         * Function Name:- isFile
         * Description  :-This function checks the name provided by the user is a file or not
         FUNCTION isFile (FILE IN VARCHAR2)
              RETURN NUMBER AS LANGUAGE JAVA NAME 'com.myCompany.myApp.bulk.FileUtil.isFile (java.lang.String) return int';
    END VSAMPLE_2;
    /

    Hi,
    I am afraid that according to the error message, it seems that this issue is mainly related to third-party, since issues using oracle database are not supported here, you could consider posting this issue in its website to get supports.
    In addition, you could mark any reply as answer if it is helpful.
    Thanks for your understanding.
    Regards.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Rpc error calling an external procedure

    I'm having a problem calling an external procedure running on Linux. The setup works using NT and a DLL, but when the function has been converted to a .so library, I get get
    ORA-28575: unable to open RPC connection to external procedure agent
    Now this is probaly due to my listener config since when starting the listener I get an IPC error:
    Connecting to (ADDRESS=(PROTOCOL=IPC)(KEY=elvis))
    TNS-12224: TNS:no listener
    TNS-12541: TNS:no listener
    TNS-12560: TNS:protocol adapter error
    TNS-00511: No listener
    Linux Error: 111: Connection refused
    Connecting to (ADDRESS=(PROTOCOL=TCP)(Host=elvis)(Port=1521))
    STATUS of the LISTENER
    Alias LISTENER
    Version TNSLSNR for Linux: Version 8.0.5.0.0 - Production
    Start Date 20-NOV-00 18:06:42
    Uptime 0 days 0 hr. 0 min. 6 sec
    Trace Level admin
    Security OFF
    SNMP OFF
    Listener Parameter File /home/oracle/ora01/app/oracle/8.0.5/network/admin/listener.ora
    Listener Log File /home/oracle/ora01/app/oracle/8.0.5/network/log/listener.log
    Listener Trace File /home/oracle/ora01/app/oracle/8.0.5/network/trace/listener.trc
    Services Summary...
    elvis has 1 service handler(s)
    extproc has 1 service handler(s)
    The command completed successfully
    I'm using Oracle 8.0.5 and RedHat 6.0. The name of machine is elvis and the sid name is elvis as well. Any bright ideas are more than welcome
    Ben

    your listener.ora file has problem!
    it should look similiar to:
    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = elvis)(PORT = 1521))
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME = PLSExtProc)
    (ORACLE_HOME = <substitute with your oracle home>)
    (PROGRAM = extproc)
    (SID_DESC =
    (GLOBAL_DBNAME = elvis)
    (ORACLE_HOME = <substitute_with_your_oralce_home>)
    (SID_NAME = elvis)
    please verify with net8 admin guide. you also need to set up tnsnames.ora correctly at client side.
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Benjamin Sigursteinsson ([email protected]):
    I'm having a problem calling an external procedure running on Linux. The setup works using NT and a DLL, but when the function has been converted to a .so library, I get get
    ORA-28575: unable to open RPC connection to external procedure agent
    Now this is probaly due to my listener config since when starting the listener I get an IPC error:
    Connecting to (ADDRESS=(PROTOCOL=IPC)(KEY=elvis))
    TNS-12224: TNS:no listener
    TNS-12541: TNS:no listener
    TNS-12560: TNS:protocol adapter error
    TNS-00511: No listener
    Linux Error: 111: Connection refused
    Connecting to (ADDRESS=(PROTOCOL=TCP)(Host=elvis)(Port=1521))
    STATUS of the LISTENER<HR></BLOCKQUOTE>
    null

  • External procedure call error in RAC

    I met a strange problem today with Oracle RAC 10.2.0.4:
    Situation I:
    In the sequence of tnsnames.ora or TAF, put NodeA before NodeB, everything works well. Even if NodeA is down and only NodeB works.
    Situation II:
    If put NodeB before NodeA, strange things happened.
    1) I can connect to via type2(tnsnames) or type4(url) via sqlplus, and I can also call my extproc in sqlplus.
    2) If I call external procedure via API, whatever type2 or type4, it will report "ORA-06576: not a valid function or procedure name"
    RAC should share anything on both nodes, why Situation I and Situation II have different behaviour? Can anyone help me? Thanks!

    Thanks.
    In fact, using the supplied makefile in $ORACLE_HOME/plsql/demo and MAKING SURE THAT THE .SO IS EXECUTABLE(!) works.

  • External Procedure

    Hi,
    I created a dynamic library for use as an external procedure, but the extproc returns the error:
    ORA-28595 - Invalid DLL path.
    I already checked the library path but it's right and the oracle user owns the directory and the library, has all the permitions needed by the OS.
    any sugestions?

    Ok, here is what have I done to eliminate this problem:
    1. I've initialized LD_LIBRARY_PATH as $ORACLE_HOME/lib befor listner starting.
    2. Ive created a simbolic link from $ORACLE_HOME/lib directory to mu development directory.
    Example:
    ln -sf $ORACLE_HOME/lib/libmylibrary.so /home/MyLogin/MyDevelopmentDirectory/libmylibrary.so.0.0

  • External Procedure Returns Bad String

    Hello,
    I have an strange issue. I have an external procedure that returns an string but when i call it Oracle gets an string of zero's ascii chars. The length it`s ok but the content not.... The wrapper function is
    PROCEDURE getString(returnValue OUT VARCHAR2) AS
    LANGUAGE C
    LIBRARY "UFDs"
    NAME "getString"
    WITH CONTEXT
    PARAMETERS (
    context,
    returnValue STRING,
    returnValue INDICATOR short,
    returnValue LENGTH int
    And the C code is
    DLLIMPORT void getString(OCIExtProcContext* context,
    char* returnValue,
    short* returnValue_ind,
    int* returnValue_len )
    returnValue = (char*)OCIExtProcAllocCallMemory(context, 13);
    //returnValue[0] = '\0';
    strcpy(returnValue,"hello from c");
    /* I have test this to gen a file an the string is OK
    char buffer[500];
    strcpy(buffer,"echo ");
    strcat(buffer,returnValue);
    strcat(buffer," >c:\\sal.txt");
    system(buffer);
    *returnValue_len = strlen(returnValue);
    *returnValue_ind = (short)OCI_IND_NOTNULL;
    return;
    When i call this from oracle i get an string of size 12 but the string has invalid chars (zero ascii chars). Could it be a problem with charset conversion? Anybody has an example or idea?.
    Regards

    Can you please post your query / stored procedure you are using? Very possible reason includes one among your substring (within the concat) is null and making the final output to be null. Size, esp 800 shouldn't matter.

  • "ORA-28578: protocol error..." before calling an external procedure

    Hello,
    Oracle reports this error
    Error report:
    SQL Error: ORA-29856: error occurred in the execution of ODCIINDEXCREATE routine
    ORA-28578: protocol error during callback from an external procedure
    29856. 00000 - "error occurred in the execution of ODCIINDEXCREATE routine"
    *Cause:    Failed to successfully execute the ODCIIndexCreate routine.
    *Action:   Check to see if the routine has been coded correctly.
    when it tries to call an external procedure in order to create a domain index. If I implement ODCIIndexCreate in PL/SQL, it is executed successfully. If I specify that ODCIIndexCreate is implement it an external library, then I get the above error even if the library does not exist on the file system. Does anyone have an idea what might be wrong?
    Regards,
    Angel Tsankov

    This forum is about using the Studio C/C++/Fortran compilers, and programming in those languages. You seem to have a question about using SQL for access to an Oracle database, which is none of the above.
    I suggest you try an Oracle database forum. Start here:
    https://forums.oracle.com/forums/category.jspa?categoryID=18
    Look for a forum that applies to your problem area.
    Edited by: Steve_Clamage on Jun 13, 2012 8:42 AM
    (Correcting the URL I posted earlier.)

  • Error Calling an external procedure

    I'm calling an external procedure (provided by a third party).
    When i invoke it from a client code, it functions.
    When I invoke it from PL/SQL code, it gives the following error:
    ORA-28576: lost RPC connection to external procedure agent.
    The solution in the help file states it could be a timeout problem.
    If so, what is the solution to the problem. (I cannot access the source of the DLL subroutine).

    your listener.ora file has problem!
    it should look similiar to:
    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = elvis)(PORT = 1521))
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME = PLSExtProc)
    (ORACLE_HOME = <substitute with your oracle home>)
    (PROGRAM = extproc)
    (SID_DESC =
    (GLOBAL_DBNAME = elvis)
    (ORACLE_HOME = <substitute_with_your_oralce_home>)
    (SID_NAME = elvis)
    please verify with net8 admin guide. you also need to set up tnsnames.ora correctly at client side.
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Benjamin Sigursteinsson ([email protected]):
    I'm having a problem calling an external procedure running on Linux. The setup works using NT and a DLL, but when the function has been converted to a .so library, I get get
    ORA-28575: unable to open RPC connection to external procedure agent
    Now this is probaly due to my listener config since when starting the listener I get an IPC error:
    Connecting to (ADDRESS=(PROTOCOL=IPC)(KEY=elvis))
    TNS-12224: TNS:no listener
    TNS-12541: TNS:no listener
    TNS-12560: TNS:protocol adapter error
    TNS-00511: No listener
    Linux Error: 111: Connection refused
    Connecting to (ADDRESS=(PROTOCOL=TCP)(Host=elvis)(Port=1521))
    STATUS of the LISTENER<HR></BLOCKQUOTE>
    null

  • Error calling external procedure on remote server

    Hello
    I have written an external procedure that runs correctly when it is on the same machine as the database from which I call it. (Windows XP Professional/Oracle 9.2)
    When I try to call the procedure from a database on another machine (also Windows XP Professiona l/ Oracle 9.2) I get ORA - 28756 "lost RPC connection to external procedure agent" or ORA - 28758 "protocol error during callback from an external procedure". Using filemon I can see that the DLL is never searched for or called. The problem seems to lie in the communication between the two machines. When I observe network traffic the machines communicate on port 1521 (the listener) and then switch to the port that the listener returns. Shortly after that the connection is terminated with the above error reported in the PL/SQL routine.
    The Oracle Administrator's Guide (9.2) states that "the agent must reside on the same computer as the application making the external procedure call." However there are several entries on the internet that show how to do what I am want to accomplish - I suspect I am making some small mistake.
    Any help would be greatly appreciated!
    Here is the listener on the machine with the DLL.
    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = jacxp01)(PORT = 1521))
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME = PLSExtProc)
    (ORACLE_HOME = C:\oracle\ora90)
    (PROGRAM = extproc)
    (ENVS = "EXTPROC_DLLS=C:\easydist\easydist\Debug\easydist.dll;C:\easydist\easydist\Release\easydist.dll")
    Here is the TNSnames.ora on the remote database machine: (I have also tried the commented lines with no more success)
    # TNSNAMES.ORA Network Configuration File: C:\oracle\ora92\network\admin\tnsnames.ora
    # Generated by Oracle configuration tools.
    EXTPROC_CONNECTION_DATA =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = IPC)(Key = EXTPROC1))
    #(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.2.121)(PORT = 1521))
    (CONNECT_DATA =
    #(SERVICE_NAME = PLSExtProc)
    (SID = PLSExtProc)
    )

    Hi Long Le Hoang,
    I am running a shell script fromSM69 which call psexec.
    shell script runs fine but SM69 execution goes on hold.
    Can you please help me how to terminate SM69 execution.
    Alpa

Maybe you are looking for

  • My scroll wheel click doesn't work anymore.

    So, you know how you can open up something in a new tab in chromium by pushing the scroll wheel on your mouse in? Well, I used to be able to do that until recently and now it just flat out doesn't work. Is this a hardware issue? My mouse is in fantas

  • Why is macbook pro running very slow?

    Hi! Could someone tell me why my macbook pro is so slow recently? During exams its really distrubing to having forced pauses. Thanks for your support! I ve just done the EtreCheck: Hardware Information:           MacBook Pro (13-inch, Mid 2010)     

  • Adobe Muse CC will not install, Get Error "Exit Code: 7"

    Need a fix to above problem fast.  Workiing on a website for work.  Using Windows 8 and uninstalled previous version. Thanks much!

  • Turning off portrait mode in browsing

    Does anyone know how to turn portrait mode off in browsing?? it's doing my nut in; keeps flicking between portrait and lanscape when i move the phone slightly ... it's the same when you get get a call aswell; trying to chase the bloody answer button

  • What is this page?!?

    Stuck trying to restore iPhone. In device page this is the screen I get! Help please?