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

Similar Messages

  • 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

  • "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 in using external procedure in PL/SQL Block

    After setting up the configuration : Respective entries in
    tnsnames.ora
    EXTPROC_CONNECTION_DATA =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
    (CONNECT_DATA = (SID = PLSExtProc)(SERVER=DEDICATED))
    and listner.ora :
    (SID_LIST = (SID_DESC = (GLOBAL_DBNAME = mymachine )(SID_NAME = mysid)) (SID_DESC = (GLOBAL_DBNAME = mymachine )(SID_NAME = myid1))
    (SID_DESC = (GLOBAL_DBNAME = mymachine )(SID_NAME = myid2))
    (SID_DESC =
    (SID_NAME = PLSExtProc)
    (ORACLE_HOME = /oracle9i)
    (PROGRAM = extproc)
    (ENVS="EXTPROC_DLLS = ANY" // Added this entry
    (SID_DESC =
    (GLOBAL_DBNAME = oracle9i)
    (ORACLE_HOME = /oracle9i)
    (SID_NAME = oracle9i)
    (ENVS="EXTPROC_DLLS= ANY") // Added this entry
    Wrote the program as :
    ===========================================================
    #include <stdio.h>
    #include<stdlib.h>
    void sh(char *command) {
    int num;
    num = system(command);
    ===========================================================
    Compiled the file (above ) shell.c as :
    gcc -c shell.c
    Made the library as :
    ld -r -o shell.so shell.o
    chmod 777shell.so
    copied the file to respective Home directories. Made one link to /usr/lib :
    which is in LD_LIBRARY_PATH
    created the Library as :
    CREATE OR REPLACE PROCEDURE shell(command IN char)
    AS EXTERNAL
    NAME "sh"
    LIBRARY shell_lib
    LANGUAGE C
    PARAMETERS (command string);
    So my problem is
    when executing the procedure from SQL prompt:
    SQL> exec shell('any command');
    it throws the following errors :
    BEGIN shell('ls'); END;
    ERROR at line 1:
    ORA-06520: PL/SQL: Error loading external library
    ORA-06522: /opt/sotas/bin/shell.so: only ET_DYN and ET_EXEC can be loaded
    ORA-06512: at "CDR_ADMIN.SHELL", line 0
    ORA-06512: at line 1
    Any help or suggestions would be appreciated
    Thanks in advance......
    Made one Link to /usr/lib

    Nikolai,
    I have created a simple process flow which only calls the external process. The script is on the same host as the process flow is deployed to.
    I have used two diffent values for the command parameter.
    1. I placed the full path of the file in the command parameter and left the script parameter blank:
    COMMAND: /edwftp/ppas/scripts/ClearPPAS.sh
    PARAMETER_LIST:
    SUCCESS_THRESHOLD: 0
    SCRIPT:
    2.I placed the bash command in the command parameter and the full path in the script parameter.
    COMMAND: /usr/bin/sh
    PARAMETER_LIST:
    SUCCESS_THRESHOLD: 0
    SCRIPT: /edwftp/ppas/scripts/ClearPPAS.sh
    Both of these appear to work as they print out the statements inside the script but the files that are supposed to be removed still remain.
    Starting Execution EXTER_FILE
    Starting Task EXTER_FILE
    Starting Task EXTER_FILE:EXTERNALPROCESS
    Removing ActivatedAudit.dat...
    Removing ActivatedCustomers.dat...
    Removing ActiveAudit.dat...
    Removing ActiveCustomers.dat...
    Done!
    Create the Activated Customers data file...
    Create the Active Customers data file...
    Done!
    WARNING: Log file truncated - see RAB for further information.
    /edwftp/ppas/scripts/ActivatedCustomers.sh: /edwftp/ppas/log/ActivatedCustomers.log: cannot create
    /edwftp/ppas/scripts/ActiveCustomers.sh: /edwftp/ppas/log/ActiveCustomers.log: cannot create
    WARNING: Log file truncated - see RAB for further information.
    Completing Task EXTER_FILE:EXTERNALPROCESS
    Completing Task EXTER_FILE
    Completing Execution EXTER_FILE
    The permissions on the /log direcotry are 775. The user I register the file location with owns this directory.
    Can't think of anything else I have missed. I really appreciate your help :)
    Ryan

  • Error calling a stored procedure from C#

    Please help me!
    I'm new in .net technology.
    I have an Oracle 9i server and an application in .net C# language.
    I'm trying to call a stored procedure written in plsql.
    This is the testing procedure:
    CREATE OR REPLACE PROCEDURE TEST_PROC
    par_1 in number
    as
    begin
    insert into tbltestinput (number_col) values (par_1);
    commit;
    end;
    And the calling code is:
    OracleCommand objCmd = new OracleCommand("TEST_PROC",conn);
    objCmd.CommandType = CommandType.StoredProcedure;
    OracleParameter inPar_1 = new OracleParameter();
    inPar_1.OracleType = OracleType.Number;
    inPar_1.Direction = ParameterDirection.Input;
    inPar_1.Value = 123456;
    objCmd.Parameters.Add(inPar_1);
    objCmd.ExecuteNonQuery();
    It returns this error:
    Exception Message: ORA-06550: row 1, column 7: PLS-00306: wrong number or types of arguments in call to 'TEST_PROC' ORA-06550: row 1, column 7: PL/SQL: Statement ignored
    Exception Source: System.Data.OracleClient
    The stored procedure is very very simple to test only the call.
    Anybody can help me.
    Thanks !!!!

    Hello,
    System.Data.OracleClient == Microsoft provider for Oracle (whereas this is the Oracle Data Provider for .NET forum).
    However, the MS provider operates in Bind By Name mode, so you might try adding this to your code:
    inPar_1.ParameterName = "par_1";Perhaps that will help a bit,
    Mark

  • AMDP syntax call to external procedure: "SQLScript message: insufficient privilege: Not authorized"

    I am getting the message "SQLScript message: insufficient privilege: Not authorized" in the syntax check in SE24 for an AMDP call to an external procedure which is not located in the default schema (located in schema MYSCHEMA).
    With DB_DBUSER & DB_DBSCHEMA I have confirmed the default user and schema to both be SAPHANAABAP.
    In HANA Studio the owner of schema MYSCHEMA has granted the following privileges:
    grant debug  on schema MYSCHEMA to SAPHANAABAP;
    grant select on schema MYSCHEMA to SAPHANAABAP;
    grant update on schema MYSCHEMA to SAPHANAABAP;
    grant delete on schema MYSCHEMA to SAPHANAABAP;
    grant insert on schema MYSCHEMA to SAPHANAABAP;
    grant attach debugger to SAPHANAABAP;
    What is the missing piece in this puzzle?

    Thanks

  • Error calling Java Stored Procedure

    hi I am calling java stored procedure from jdbc. i am getting wierd exceptions:
    CallableStatement cstmt = conn.prepareCall("begin SEND_MAIL(?,?,?);end;");
    cstmt.setString(1,"[email protected]");
    cstmt.setString(2,"Mail from Stored Proc");
    cstmt.setString(3,"This is test mail from Oracle8i");
    cstmt.execute();
    i am getting following Exception:
    java.sql.SQLException: ORA-29532: Java call terminated by uncaught Java exception: java.security.AccessControlException: the Permission (java.util.PropertyPermission * read,write) has not been granted by dbms_java.grant_permission to SchemaProtectionDomain(ISTORE_CUST|PolicyTableProxy(ISTORE_CUST))
    ORA-06512: at "ISTORE_CUST.SEND_MAIL", line 0
    ORA-06512: at line 1
    null

    I think u dont've previleges to run
    the procedure.
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by arunr12:
    hi I am calling java stored procedure from jdbc. i am getting wierd exceptions:
    CallableStatement cstmt = conn.prepareCall("begin SEND_MAIL(?,?,?);end;");
    cstmt.setString(1,"[email protected]");
    cstmt.setString(2,"Mail from Stored Proc");
    cstmt.setString(3,"This is test mail from Oracle8i");
    cstmt.execute();
    i am getting following Exception:
    java.sql.SQLException: ORA-29532: Java call terminated by uncaught Java exception: java.security.AccessControlException: the Permission (java.util.PropertyPermission * read,write) has not been granted by dbms_java.grant_permission to SchemaProtectionDomain(ISTORE_CUST|PolicyTableProxy(ISTORE_CUST))
    ORA-06512: at "ISTORE_CUST.SEND_MAIL", line 0
    ORA-06512: at line 1
    <HR></BLOCKQUOTE>
    null

  • Error Calling Oracle Stored Procedure From Within Report

    Hi,
    I have a report that calls an oracle stored procedure which returns a ref cursor. The report is working ok in our development environment when called from our development website through .NET.
    When the report is moved and accessed from our UAT website we get the following error :-
    Failed to open a rowset. Details: ADO Error Code: 0x Source: Microsoft OLE DB Provider for Oracle Description: One or more errors occurred during processing of command. Failed to open a rowset. Details: ADO Error Code: 0x Source: Microsoft OLE DB Provider for Oracle Description: ORA-06550: line 1, column 7: PLS-00306: wrong number or types of arguments in call to 'RHS_GET_CAND_SECTION_REFS' ORA-06550: line 1, column 7: PL/SQL: Statement ignored Native Error: Failed to open a rowset. Error in File C:\WINDOWS\TEMP\temp_d663a952-bef6-4bf7-bf1a-5e288afdb612 {9B6DFB38-A436-4940-9D80-B4C23DFFFF19}.rpt: Failed to open a rowset.
    If we open the report manually we are prompted to enter database connection info. If we enter the UAT connection details the report runs ok. If we save the report and try to open it from UAT website through .NET it now opens ok.
    If we then move that same report back to the development environment and open from our development website it fails with the same error above.
    Both connections are using Microsoft OLE DB drivers and the Oracle databases are the same version (10.2.0.1.0).
    Is the connection information being stored in actual report and somehow being used when the report is opened through .NET?
    Any help appreciated
    Regards
    Paul

    Hi,
    Please let me know if the issue occurs with the crystal reports designer, if you are facing issues with the .NET application then a need to create a post [here|SAP Crystal Reports, version for Visual Studio;.
    Regards,
    Hitesh

  • 403 Forbidden error calling PL/SQL Procedure from URL

    I am getting a 403 Forbidden browser error when calling a PL/SQL procedure from the URL, as in this:
    http://<server.port>/apex/SCHEMA.procedure_name/f?p_param1=394&p_param2=2, etc
    We are upgrading from HTMLDB 2.0 to APEX 4.0.2. I do not believe the upgrade has anything to do with it, c/o the upgraded app works fine in another APE 4.0.2 environment.
    The upgrade is to new machines, new DB and new app server, Oracle Web Tier, Oracle HTTP server deployment.
    The dads.conf entries are fine, all standard:
    Alias /i/ "/apexd01/app/oracle/product/http/Oracle_WT1/ohs/images/"
    Alias /c/ "/apexd01/app/oracle/product/http/Oracle_WT1/ohs/custom_htmldb/"
    <Location /pls/apexd>
    Order deny,allow
    PlsqlDocumentPath docs
    AllowOverride None
    PlsqlDocumentProcedure wwv_flow_file_mgr.process_download
    PlsqlDatabaseConnectString dbserver.us.com:1521:SERVER.US.COM ServiceNameFormat
    PlsqlNLSLanguage AMERICAN_AMERICA.AL32UTF8
    PlsqlAuthenticationMode Basic
    SetHandler pls_handler
    PlsqlDocumentTablename wwv_flow_file_objects$
    PlsqlDatabaseUsername APEX_PUBLIC_USER
    PlsqlDefaultPage apex
    PlsqlDatabasePassword apexpwd
    PlsqlRequestValidationFunction wwv_flow_epg_include_modules.authorize
    Allow from all
    </Location>
    The GRANT EXECUTE ON procedure TO PUBLIC is there.
    A call to the same procedure via a process in an APEX page works fine - the procedure is OK.
    The call from javascript, which sets up the call from the URL, is the one that fails with the 403 Forbidden error.
    The same app works fine in another APEX 4.0.2 environment, so I know it is not the JS; It has to be some configuration setting in this environment.
    I do NOT have access to the app server.
    I have asked that they compare the httpd.conf, and all underlying conf files, to check for differences.
    In order for me to be more specific, and hopefully speed up the troubleshooting process, can anyone suggest what other settings to look at?
    Thank you - Karen

    Hello,
    Good catch, but the difference in URL is in fact the difference in my env to theirs. My typo in not correcting my example to match the dads.conf entry of /pls/apexd. My env uses /apex/. Just saves on my typing.
    As an update, I asked the DBA to double-check, and yes, the www_flow_epg_include_mod_local function IS there.
    www_flow_epg_include_mod_local is an APEX function.
    So now we are trying adding procedures to it. I'll let you know if it works.
    My previous question remains - why would I need to do this in one env, and not another,
    given that the DB GRANTs are there.
    Is there a particular app server setting that wil block execution of PL/SL procedures from the URL?
    My guess is, there is some difference in configuration settings for the app server, somewhere in the httpd.conf chain.
    Since I do not have access to those files, I cannot do a diff myself, as I would have if I the issue was on my machine.
    I am in a situation where I can suggest what to do, but that's it. I agree, it's hard to troubleshoot in this situation.
    I am being asked "what setting do I need to change?" without the benefit of access to what is there,so I am doing the best I can, without diverting from my work for a deep-dive refresher session on httpd.conf settings.
    So, if anyone is aware of some setting that would block execution of a PL/SQL proc from the URL, please let me know,
    and of course, if adding a proc to www_flow_epg_include_mod_local works, I'll be happy. Just still curious.
    Thank you - K

  • Getting error calling a package/procedure from DB

    I'm on 11.1.1.6 and I'm trying to execute a procedure in a package in the DB my ADF application is connected to.  I get the following error  "Could not find saved view state for token".  If I comment out the execution of the method that is calling the procedure the error goes away.  The error shows up under the log for the application on the EM console.  The procedure does not get executed.  Can anyone tell me what it could be?  I am using the tool Oracle provided to gain access to the EBS database without using the apps password.  I wonder if that may be causing the issue?  Can it be related to a security or grant issue of some kind?  The package procedure is under the apps schema.

    Hi,
    I don't think that on this forum we know enough about EBS to be helpful with security privileges. But if you read this here ADF &amp;amp; Weblogic How To: TROUBLESHOOTING: Could not find saved view state for token ...
    then it seems that there are some sort of access problem
    Frank

  • Error calling a stored procedure

    Hi buddies, I've the following store procedure:
    PROCEDURE USP_GET_SMALL_SIZE_ROWS_DATA(tableName VARCHAR2, isSource pls_integer, since pls_integer, untilValue pls_integer, pk_Name OUT CLOB, xmlResult OUT CLOB);Inside the package REPLICATION_PACK
    and then, when I run this:
    DECLARE
      pk_Name CLOB;
      xmlResult CLOB;
    BEGIN
      EXEC REPLICATION_PACK.USP_GET_SMALL_SIZE_ROWS_DATA('TableName', 1, 1, 50, :pk_Name, :xmlResult);
    END;It shows me this error: "SP2-0552: Bind variable "XMLRESULT" not declared." Could you help me?
    Thanks you in advance.

    You can not do what it appears you are trying to do.
    EXEC REPLICATION_PACK.USP_GET_SMALL_SIZE_ROWS_DATA('PERSON', 1, 1, 50, pk_Name, xmlResult);
    requires that pk_Name and xmlResult have values: They have none. This is not code that can ever be run in SQL*Plus from the command line.
    Your procedures is built on the following parameters:
    (tableName VARCHAR2, isSource pls_integer, since pls_integer, untilValue pls_integer, pk_Name OUT CLOB, xmlResult OUT CLOB)So your table_name is 'PERSON' ... good so far
    You r isSource and since and untilVal are integers and your have provided 1, 1 and 50 ... good so far.
    But the next two parameters are OUT params ... they need to go somewhere.
    So run it like this:
    DECLARE
    pkNameOUT CLOB;
    xmlResultOUT CLOB;
    BEGIN
      REPLICATION_PACK.USP_GET_SMALL_SIZE_ROWS_DATA('PERSON', 1, 1, 50, pkNameOut, xmlResultOut);
    END;
    /Then you've got to figure out what to do with those two CLOB variables or they just evaporate.

  • Error calling a  stored procedure returning a PLSQL table /  REF cursor

    stored proceure declares -
    TYPE A_rec IS RECORD (
    date DATE,
    id NUMBER(10),
    start NUMBER (10),
    end NUMBER (10)
    TYPE tmp_tbl IS TABLE OF A_rec ;
    PROCEDURE get_B(
    p_id IN NUMBER,
    p_startdate IN DATE,
    p_enddate IN DATE,
    p_tbl OUT tmp_tbl
    My Java code reads -
    StoredProcedureCall storedProcedureCall = new StoredProcedureCall();
    storedProcedureCall.setProcedureName("get_B");
    DataReadQuery query = new DataReadQuery();
    query.setCall(storedProcedureCall);
    Vector parameters = new Vector();
    /** For all input params **/
    query.addArgument(param.getInputParamName(" name");
    parameters.add("values");
    /** Now comes the OUT part .. i am not sure what to do **/
    storedProcedureCall.useNamedCursorOutputAsResultSet("p_tbl ");
    /** execute query **/
    Vector result = (Vector) getSession(ctx).executeQuery(query, parameters);
    ------------- My program does not throw any error ... but does not return anything ----

    TopLink currently doesn't support pl/sql types to be used as stored procedures parameters - but version 11 will.
    However you can use a single cursor as an out parameter in your stored procedure:
    p_tbl OUT CURSOR_TYPE.ANY_CURSOR,
    and it will be returned by TopLink.

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

  • RPC error while executing procedure

    Hi,
    whenever I execute a procedure which extracts data from COBOL through relativity, it gives me RPC error and exits, the procedure code and error description is provided below,
    Procedure Code:
    ===========
    CREATE OR REPLACE Procedure CDB.pop_UtilityBill AS
    txt_Truncate Varchar2(200);
    txt_Rename Varchar2(500);
    BEGIN
    txt_Truncate := 'truncate table UtilityBill_Tmp';
    execute immediate (txt_Truncate);
    --Loading of Date from UTLMERGE File to Temporary Table
    Insert into UtilityBill_TMP
    (UtlBillDate,Branch ,Booth ,Batch,Card,Bill ,DocNo,Account ,ElcAcc ,ElcFil, GasAcc, GasFil, RegCode , ExchCode, PtclAcc , PtclFil ,
    WasaAcc, WasaFil , Amount , TranType , ChequeNo , Bank , Flag , UtlBillTime , PostId , FlatbedFlag , FlatbedMicrread , FlatbedEndorse , BillingMonth )
    Select DECODE("MrgDate",0,TO_DATE(NULL),TO_DATE("MrgDate"+1721423,'J')) UtlBillDate,
    "Branch",
    "Booth",
    "Batch",
    "Card",
    "Bill",
    "DocNo",
    "Account",
    "ElcAcc",
    "ElcFil",
    "GasAcc",
    "GasFil",
    "RegCode",
    "ExchCode",
    "PtclAcc",
    "PtclFil" ,
    "WasaAcc",
    "WasaFil" ,
    "Amount",
    "TranType",
    "ChequeNo",
    "Bank" ,
    "Flag" ,
    "MrgTime" UtlBillTime ,
    "PostId",
    "FlatbedFlag",
    "FlatbedMicrread" ,
    "FlatbedEndorse",
    "BillingMonth"
    From UTLMRG2M_CURR@BIDB
    INNER JOIN Branches_Control_UtlBill BU on BU.Branch = "Branch"
    where "MrgDate" > UtilityBill_Date
    and "Card" <> 9;
    COMMIT;
    --Loading of Date from Temporary Table to Interface Table
    INSERT INTO UtilityBill_I
    (UtlBillDate,Branch ,Booth ,Batch,Card,Bill ,DocNo,Account ,ElcAcc ,ElcFil, GasAcc, GasFil, RegCode , ExchCode, PtclAcc , PtclFil ,WasaAcc,
    WasaFil , Amount , TranType , ChequeNo , Bank , Flag ,UtlBillTime , PostId , FlatbedFlag , FlatbedMicrread , FlatbedEndorse , BillingMonth )
    Select UtlBillDate,
    Branch,
    Booth,
    Batch,
    Card,
    Bill,
    DocNo,
    Account,
    ElcAcc,
    ElcFil,
    GasAcc,
    GasFil,
    RegCode,
    ExchCode,
    PtclAcc,
    PtclFil ,
    WasaAcc,
    WasaFil ,
    Amount,
    TranType,
    ChequeNo,
    Bank ,
    Flag ,
    UtlBillTime ,
    PostId,
    FlatbedFlag,
    FlatbedMicrread ,
    FlatbedEndorse,
    BillingMonth
    From UtilityBill_TMP;
    COMMIT;
    --Swapping of Data from Interface Table to Actual Table
    EXECUTE IMMEDIATE('RENAME UtilityBill TO UtilityBill_Bkp');
    EXECUTE IMMEDIATE('RENAME UtilityBill_I TO UtilityBill');
    EXECUTE IMMEDIATE('RENAME UtilityBill_Bkp TO UtilityBill_I');
    -- Insertion in Interface Table for Next Day Preparation
    INSERT INTO UtilityBill_I
    (UtlBillDate,Branch ,Booth ,Batch,Card,Bill ,DocNo,Account ,ElcAcc ,ElcFil, GasAcc, GasFil, RegCode , ExchCode, PtclAcc , PtclFil ,WasaAcc,
    WasaFil , Amount , TranType , ChequeNo , Bank , Flag ,UtlBillTime , PostId , FlatbedFlag , FlatbedMicrread , FlatbedEndorse , BillingMonth )
    Select UtlBillDate,
    Branch,
    Booth,
    Batch,
    Card,
    Bill,
    DocNo,
    Account,
    ElcAcc,
    ElcFil,
    GasAcc,
    GasFil,
    RegCode,
    ExchCode,
    PtclAcc,
    PtclFil ,
    WasaAcc,
    WasaFil ,
    Amount,
    TranType,
    ChequeNo,
    Bank ,
    Flag ,
    UtlBillTime ,
    PostId,
    FlatbedFlag,
    FlatbedMicrread ,
    FlatbedEndorse,
    BillingMonth
    From UtilityBill_TMP;
    COMMIT;
    txt_Truncate := 'TRUNCATE TABLE UtilityBill_Tmp';
    execute immediate(txt_Truncate);
    Commit;
    END;
    Error Description:
    ===========
    BEGIN pop_UtilityBill; END;
    ERROR at line 1:
    ORA-02068: following severe error from BIDB
    ORA-28511: lost RPC connection to heterogeneous remote agent using
    SID=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=cdbprd)(PORT=1521)
    ))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=HSODBC1)))
    ORA-06512: at "CDB.POP_UTILITYBILL", line 10
    ORA-06512: at line 1
    HS trace file:
    ========
    Oracle Corporation --- TUESDAY MAY 08 2012 18:03:53.979
    Heterogeneous Agent Release
    9.2.0.8.0
    HS Agent received unexpected RPC disconnect
    Network error 1003: NCR-01003: NCRS: Read error.
    Oracle database Version:
    ===============
    Oracle9i Release 9.2.0.8.0 - Production
    Operating System:
    ===========
    Microsoft Windows Server 2003 SP2
    can anybody help me out on this?

    remove the line break then if youre loading that in. Apologies, I didnt read the next line. The error is with the insert, if youre loading that up as a sql command file it wont run like that with the line break as it reads it as separate commands quick example.
    SQL> host more ins.sql
    insert into t1
    (select * from dba_objects
    where rownum = 1);
    commit;
    SQL>
    SQL> create table t1 as select * from dba_objects where 1=0;
    Table created.
    SQL> @ins
    OWNER
    OBJECT_NAME
    SUBOBJECT_NAME                  OBJECT_ID DATA_OBJECT_ID OBJECT_TYPE
    CREATED   LAST_DDL_ TIMESTAMP           STATUS  T G S  NAMESPACE
    EDITION_NAME
    SYS
    ICOL$
                                           20              2 TABLE
    OWNER
    OBJECT_NAME
    SUBOBJECT_NAME                  OBJECT_ID DATA_OBJECT_ID OBJECT_TYPE
    CREATED   LAST_DDL_ TIMESTAMP           STATUS  T G S  NAMESPACE
    EDITION_NAME
    09-DEC-10 09-DEC-10 2010-12-09:03:39:59 VALID   N N N          1
    Commit complete.
    SQL> select * from t1;
    no rows selected
    SQL>
    -- ok, try it without the linebreak
    SQL> host more ins1.sql
    insert into t1
    (select * from dba_objects
    where rownum = 1);
    commit;
    SQL> @ins1
    1 row created.
    Commit complete.
    SQL>

  • ORA-12203 while calling a form from external procedure

    Hi
    I am using oracle 10g 10.2.0.3.0 database with forms 6i. We have created a database procedure , which makes a call to external procedure(C program). Now this external procedure creates a process and process is creating a call to form.
    We have checked through the process explorer in the server, process is getting created successfully, but doesn't executed. We tried to start the process manually, it is throwing ora-12203: TNS unable to connect to destination.
    We are able to connect the database from form's runtime. but if this runtime is executed from a process which is created by external procedure, it is throwing ora-12203.
    Any idea?

    check tnsnames and listener files.verify the host and the port

Maybe you are looking for

  • 2G Nano-USB Device Not Recognized message

    2G Nano has been sitting for months. Decided to use it as a backup. When connected to computer (tried on 4 different computers running iTunes) I get a "USB Device Not Recognized" message. It shows up in "Device Manager" as an "Unknown USB Device" not

  • Problem when connection to TOAD

    Hi, Oracle Version :10.2.0.4 Operating System : Windows-7(64-bit) Toad Version : 9.5.0.31(32-bit) Hi i installed oracle 64-bit on windows 7 64 bit and when i tried to connect to the database through toad i am getting the error as show below and file

  • Export to Facebook FAN PAGE

    Does anyone know how to upload photos to a facebook fan page? All I can do is upload to a profile and not a fan page.

  • Copy paste stops working lion

    Amazed to find, I open a PDF, select text, click 'Edit Copy'... Go to text edit, click 'Edit Paste', and nothing happens. If I did not have something on the clipboard, paste does not appear. Crazy huh, a 'fundamental feature' regression is able to oc

  • Premiere Pro dropped audio after export, AME no audio

    Similar problem in both premiere & AME - clips are exporting with video but no audio. When queueing up jobs in AME, they'll finish with no Audio & now even exporting directly from the timeline in Premiere Pro CC 2014.2 (just updated 2014-12-14) our c