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

Similar Messages

  • Need to do a commit in a procedure called from a trigger

    How do I get around the need to do a commit in a procedure that is being executed from a trigger. I know it can't be done but I bet someone has a workaround. Thanks.

    Hi
    Why do you want to do a commit in a procedure called from a trigger?
    Anyway if you are running Oracle 8i+ you can declare the procedure as an Autonomous Transaction and can issue a commit, eventhough it is called from a trigger.
    HTH
    Arvind Balaraman

  • Java function call from Trigger in Oracle

    Moderator edit:
    This post was branched from an eleven-year-old long dead thread
    Java function call from Trigger in Oracle
    @ user 861498,
    For the future, if a forum discussion is more than (let's say) a month old, NEVER resurrect it to append your new issue. Always start a new thread. Feel free to include a link to that old discussion if you think it might be relevant.
    Also, ALWAYS use code tags as is described in the forum FAQ that is linked at the upper corner of e\very page. Your formulae will be so very much more readable.
    {end of edit, what follows is their posting}
    I am attempting to do a similar function, however everything is loaded, written, compiled and resolved correct, however, nothing is happening. No errors or anything. Would I have a permission issue or something?
    My code is the following, (the last four lines of java code is meant to do activate a particular badge which will later be dynamic)
    Trigger:
    CREATE OR REPLACE PROCEDURE java_contact_t4 (member_id_in NUMBER)
    IS LANGUAGE JAVA
    NAME 'ThrowAnError.contactTrigger(java.lang.Integer)';
    Java:
    CREATE OR REPLACE AND COMPILE JAVA SOURCE NAMED "ThrowAnError" AS
    // Required class libraries.
    import java.sql.*;
    import oracle.jdbc.driver.*;
    import com.ekahau.common.sdk.*;
    import com.ekahau.engine.sdk.*;
    // Define class.
    public class ThrowAnError {
    // Connect and verify new insert would be a duplicate.
    public static void contactTrigger(Integer memberID) throws Exception {
    String badgeId;
    // Create a Java 5 and Oracle 11g connection.
    Connection conn = DriverManager.getConnection("jdbc:default:connection:");
    // Create a prepared statement that accepts binding a number.
    PreparedStatement ps = conn.prepareStatement("SELECT \"Note\" " +
    "FROM Users " +
    "WHERE \"User\" = ? ");
    // Bind the local variable to the statement placeholder.
    ps.setInt(1, memberID);
    // Execute query and check if there is a second value.
    ResultSet rs = ps.executeQuery();
    while (rs.next()) {
    badgeId = rs.getString("Note");
    // Clean up resources.
    rs.close();
    ps.close();
    conn.close();
    // davids badge is 105463705637
    EConnection mEngineConnection = new econnection("10.25.10.5",8550);
    mEngineConnection.setUserCredentials("choff", "badge00");
    mEngineConnection.call("/epe/cfg/tagcommandadd?tagid=105463705637&cmd=mmt%203");
    mEngineConnection.call("/epe/msg/tagsendmsg?tagid=105463705637&messagetype=instant&message=Hello%20World%20from%20Axium-Oracle");
    Edited by: rukbat on May 31, 2011 1:12 PM

    To followup on the posting:
    Okay, being a oracle noob, I didn't know I needed to tell anything to get the java error messages out to the console
    Having figured that out on my own, I minified my code to just run the one line of code:
    // Required class libraries.
      import java.sql.*;
      import oracle.jdbc.driver.*;
      import com.ekahau.common.sdk.*;
      import com.ekahau.engine.sdk.*;
      // Define class.
      public class ThrowAnError {
         public static void testEkahau(Integer memberID) throws Exception {
         try {
              EConnection mEngineConnection = new EConnection("10.25.10.5",8550);
         } catch (Throwable e) {
              System.out.println("got an error");
              e.printStackTrace();
    }So, after the following:
    SQL> {as sysdba on another command prompt} exec dbms_java.grant_permission('AXIUM',"SYS:java.util.PropertyPermission','javax.security.auth.usersubjectCredsOnly','write');
    and the following as the user
    SQL> set serveroutput on
    SQL> exec dbms_java.set_output(10000);
    I run the procedure and receive the following message.
    SQL> call java_contact_t4(801);
    got an error
    java.lang.NoClassDefFoundError
         at ThrowAnError.testEkahau(ThrowAnError:13)
    Call completed.
    NoClassDefFoundError tells me that it can't find the jar file to run my call to EConnection.
    Now, I've notice when I loaded the sdk jar file, it skipped some classes it contained:
    c:\Users\me\Documents>loadjava -r -f -v -r "axium/-----@axaxiumtrain" ekahau-engine-sdk.jar
    arguments: '-u' 'axium/***@axaxiumtrain' '-r' '-f' '-v' 'ekahau-engine-sdk.jar'
    creating : resource META-INF/MANIFEST.MF
    loading : resource META-INF/MANIFEST.MF
    creating : class com/ekahau/common/sdk/EConnection
    loading : class com/ekahau/common/sdk/EConnection
    creating : class com/ekahau/common/sdk/EErrorCodes
    loading : class com/ekahau/common/sdk/EErrorCodes
    skipping : resource META-INF/MANIFEST.MF
    resolving: class com/ekahau/common/sdk/EConnection
    skipping : class com/ekahau/common/sdk/EErrorCodes
    skipping : class com/ekahau/common/sdk/EException
    skipping : class com/ekahau/common/sdk/EMsg$EMSGIterator
    skipping : class com/ekahau/common/sdk/EMsg
    skipping : class com/ekahau/common/sdk/EMsgEncoder
    skipping : class com/ekahau/common/sdk/EMsgKeyValueParser
    skipping : class com/ekahau/common/sdk/EMsgProperty
    resolving: class com/ekahau/engine/sdk/impl/LocationImpl
    skipping : class com/ekahau/engine/sdk/status/IStatusListener
    skipping : class com/ekahau/engine/sdk/status/StatusChangeEntry
    Classes Loaded: 114
    Resources Loaded: 1
    Sources Loaded: 0
    Published Interfaces: 0
    Classes generated: 0
    Classes skipped: 0
    Synonyms Created: 0
    Errors: 0
    .... with no explanation.
    Can anyone tell me why it would skip resolving a class? Especially after I use the -r flag to have loadjava resolve it upon loading.
    How do i get it to resolve the entire jar file?
    Edited by: themadprogrammer on Aug 5, 2011 7:15 AM
    Edited by: themadprogrammer on Aug 5, 2011 7:21 AM
    Edited by: themadprogrammer on Aug 5, 2011 7:22 AM
    Edited by: themadprogrammer on Aug 5, 2011 7:23 AM
    Edited by: themadprogrammer on Aug 5, 2011 7:26 AM

  • Stored Procedure call from JDBC sender for Oracle Database

    Hi,
    I have a requirement to call stored procedure using JDBC sender adapter for retriving data from an Oracle database.
    I need to execute first stored procedure call from Querry SQL statement and then trigger second stored procedure call for confirming the succesful retrival of those records from the update SQL statement.
    Querries:
    1. Can we trigger stored procedure from Update statement of JDBC sender.
    2. Can we call stored procedure from Querry statement, since I have read on other sdn threads that stored procedure calls on Oracle database are not allowed. If not possible to have "Execute stored procedure" would the function call (select * from table(function name)) work same as stored procedure.
    3. In a JDBC sender the Querry statement and Update statement are executed in same session call and same database connection. What happens if the querry statement was not succesful, would the update be still triggered.
    Please note PI does not have direct access to main table and hence the need to have separate stored procedure calls.
    The PI version is PI 7.11 sp4.
    Appreciate your inputs.
    Thanks.
    Siddhesh S.Tawate

    >1. Can we trigger stored procedure from Update statement of JDBC sender.
    I think not possible using update statement.
    > Can we call stored procedure from Querry statement, since I have read on other sdn threads that stored procedure calls on Oracle database are not allowed. If not possible to have "Execute stored procedure" would the function call (select * from table(function name)) work same as stored procedure.
    Yes using select query you can call stored procedure.
    >. In a JDBC sender the Querry statement and Update statement are executed in same session call and same database connection. What happens if the querry statement was not succesful, would the update be still triggered.
    No select and update handles in the same session using the same thread so if one transaction fails update should not proceed.

  • 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

  • External procedure call for cobol programs

    I'm trying to call cobol programs using external procedure calls. I followed metalink doc#119543.1 but when the cobol shared library is called from PL/SQL, the session hangs. I'm running Oracle 9.2.0.4 EE, Microfocus Server Express 2.2, C for AIX v6, and AIX 5.2 (64-bit). If you know how to get this working or you have a working test case, please post a reply. Thanks.

    You know that there are several steps to it :
    1.- Make a library from cobol a the source code in a file
    2.- Check the listener parameters to call external procedures and the service in the client
    3.- Make a library inside the database
    4.- Create the procedure that is going to call the
    procedure.
    Did you do those steps?
    Joel P�rez

  • External Procedure call - wait event - no response

    Executing SQL that use external library - I dont get any response
    I see wait event as 'External Procedure call' and no response, no errors are thrown.
    Am I missing something or how do I troubleshoot further...
    Your help very much appreciated.
    Please note I have no entry in TNSNAMES.ORA or LISTENER.ORA file for extproc connections.
    Oracle DB - Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    Listener - TNSLSNR for Linux: Version 11.2.0.3.0
    OS - Red Hat Enterprise Linux Server release 6.5
    DLL entry done ONLY in "/apps/oracle/product/11.2.0/dbhome_1/hs/admin/extproc.ora"
    SET EXTPROC_DLLS=ANY
    OS Environment LD_LIBRARY_PATH=
    LD_LIBRARY_PATH=/apps/oracle/product/11.2.0/dbhome_1/lib
    DLL File permission
    -rwxrwxr-x  1 oracle oinstall   8022832 Mar  6 12:55 libst_shapelib.so
    OS EXTPROC process is running
    oracle   17489     1  0 09:08 ?        00:00:00 extprocGISDEV (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=BEQ)))
    Library Path set at schema level as below
    select * from dba_libraries where library_name = 'ST_SHAPELIB';
    OWNER                          LIBRARY_NAME                   FILE_SPEC                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        DYNAMIC STATUS
    SDE                            ST_SHAPELIB                    /apps/oracle/product/11.2.0/dbhome_1/lib/libst_shapelib.so                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       Y       VALID  

    Hello,
    This is posted in the incorrect community.  I think you need to be in SQL and PL/SQL
    Regards,
    Matt

  • Execution Times of Stored Procedures Called from Other Stored Procedures

    If I execute sys.dm_exec_procedure_stats, it will produce execution times of my stored procedures executed recently.
    However, stored procedures called from other stored procedures do not show up.
    Is there code that can return the execution times of stored procedures even though they are called from other stored procedures.

    Look at the example. It is counting nested execution.
    CREATE PROC z1SP AS SELECT * FROM Production.Product;
    GO
    CREATE PROC z2SP AS SELECT * FROM Production.Product WHERE Color is not null; EXEC z1SP;
    GO
    SELECT object_name(2002822197), object_name(2034822311);
    --z1SP z2SP
    EXEC z1SP; EXEC z2SP;
    GO 10
    SELECT * from sys.dm_exec_procedure_stats
    database_id object_id type type_desc cached_time last_execution_time execution_count
    16 2002822197 P SQL_STORED_PROCEDURE 2014-12-16 13:02:45.170 2014-12-16 13:02:46.717 20
    16 2034822311 P SQL_STORED_PROCEDURE 2014-12-16 13:02:45.460 2014-12-16 13:02:46.687 10
    Kalman Toth Database & OLAP Architect
    SQL Server 2014 Database Design
    New Book / Kindle: Beginner Database Design & SQL Programming Using Microsoft SQL Server 2014

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

  • 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 calls supported?

    Are external procedure calls supported? Should be, right?
    I didn't find anything in the documentation and the directory $ORACLE_HOME/rdbms/extproc doesn't exist either.
    But the binary $ORACLE_HOME/bin/extproc is there.
    Thanks,
    ~Dietmar.

    Hi Sven,
    you have beaten me again ;). I'm too slow.
    "Any errors that occur during the execution of the
    job will be returned as errors to the RUN_JOB
    procedure."True, when the job cannot be executed, a plsql exception is raised.
    I just don't get the exit code back. If something goes wrong inside the executable, I want to be able to detect that. Usually the called script sets an exit code for that purpose.
    >>How do I get a handle on the LOG_ID?
    Are they any public variable in dbms_scheduler. e.q.
    LastLogID ;-) ?No, I 've checked the package. But the exit code doesn't seem to be logged either. error# in USER_SCHEDULER_JOB_RUN_DETAILS is 0, even when the exit code is set to non-zero.
    See the following sample:
    File: error_throw.cmd
    exit /b 1I have checked that the exit code handling works using this script:
    @echo off
    call error_throw.cmd
    IF ERRORLEVEL 3 GOTO errhandler
    IF ERRORLEVEL 2 goto errhandler
    IF ERRORLEVEL 1 goto errhandler
    echo "successful run"
    goto end
    :ERRHANDLER
    echo errorlevel
    :ENDand I called it using:
    begin
      DBMS_SCHEDULER.create_job (
        job_name        => 'GO_SYNC',
        job_type        => 'EXECUTABLE',
        job_action      => 'C:\temp\dosBatch\error_throw.cmd',
        enabled         => FALSE,
        comments        => 'Synchronously run command.');
    end;
    BEGIN
      -- Run job synchronously.
      DBMS_SCHEDULER.run_job (job_name            => 'GO_SYNC',
                              use_current_session => TRUE);
      -- Remove job after run
      DBMS_SCHEDULER.DROP_JOB('GO_SYNC');
    END;
    /~Dietmar.
    daust: wrong command file called: error_throw.cmd instead of error_handle.cmd

  • Common procedure call from db trigger.

    hi all,
    i have one procedure, which is called from most of the db-triggers on tables.
    while dml operation, db-trigger on table calls this common procedure.
    while executing this procedure, i want to know currently, it is called from which trigger and table.
    is it possible?
    regards.

    in that case i have to modify all the triggers on table, which is labourious job.
    any other solution.

  • Passing UDT TABLE of VARCHAR as an Input parameter in Stored procedure call from java

    I have following Type defined at the schema: ident_arr IS TABLE OF VARCHAR2(100) which is type of one of the input parameters. I am able to create oracle.sql.ARRAY object to map it with this UDT before calling my stored procedure from java. When I execute my stored procedure, I get the following error:
    ORA-06550: line 1, column 7:
    PLS-00306: wrong number or types of arguments in call to 'P_PV_WCC_INSERT'
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    I have already checked all other parameter types.

    Hello,
    Thank you, guys, for advice. I should have explained calling context before, but what I basically need to do is to see if procedure(arg1, list(record(arg2, arg3))) returns true.
    I see array binding wouldn't fit there nicely. Internal procedure calls would be proc(next(arg1), next(arg2), next(arg3)) - if all these return true, external call should also return true. I would need to make a list of repeating values of arg1 and separate list(record(arg2, arg3)) into separate lists. I would also need to record whether the internal call returns true to deduce whether external call returns true.
    As I see no better way yet, I'll make Oracle procedure proc(arg1, arg2, arg3) and implement a loop in .NET side. If I optimize for performance, I'll probably pack the array of records into string and pass it for Oracle side to parse.
    Regards,
    Aurimas Pranskevicius

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

  • Error while invoking external WS call from BPEL2.0

    Hi,
    I have a BPEL process from where I am making external WS call.
    I have the WSDL file & the Endpoint URL for the external WS.
    So,I have follow the below steps at BPEL editor.
    1. Synchronous BPEL process[it includes 'receiveInput' & 'replyOutput'].
    2. Added a "Partnet Link"[Created using external WSDL & Endpoint URL] at the Right hand side of BPEL Editor
    3.Added "Invoke" node between 'receiveInput' & 'replyOutput' and then pointed to the newly created "PartnerLink"
    While rebuilding the .jpr file I am getting the below error.
    **C:\JDeveloper\mywork\CustomerDetails\CustomerDetails.bpel**
    **Error(75): Element 'scope' not expected.**
    Can Any one help me to resolve the issue ??
    Note: I have been using JDev 11.1.1.6 and have gone through the below URL for similar kinda sample.
    http://docs.oracle.com/cd/E23943_01/dev.1111/e10224/bp_sync.htm#CIHIEIHD
    Cheers,
    Deba

    Hi Deba,
    Just so I get my facts straight, when you look at the BPEL source code, what do you see? You should be seeing, first, a sequence, then, the receive activity, and then your invoke activity and finally reply. Isn't it?
    As far as the error message suggests, looks like you have placed a "scope" - structured activity, at a place it does not belong.
    HTH
    Cheers
    Swagat

Maybe you are looking for

  • WebtopNaming - can not find server name for server ID

    We have a LB, and web servers in front of OpenSSO app servers in our environment. OpenSSO debug log CoreSystem fills up with lot of errors like these: ERROR: WebtopNaming.getServerFromID() can not find server name for server ID : 07 com.iplanet.servi

  • Cannot copy and paste in owa

    Multiple users mostly using windows 7 and IE 8 and 9 cannot from a keyboard print screen or alt print screen and then do a right click paste or cntrl v into a new email or reply in OWA for Microsoft online.

  • Help w/Photoshop Elements 6

    I was working with Elements 6 and took the image to 200% [to get a closer look at something], by typing in 200% in the lower left-hand corner of the APS window.  This has given the photo file a huge border around the image and no matter how many time

  • Standard text must change its value in run time in english or in chinese

    Hi all, i have created the standard text in SO10. name is  YTEST and inside i have declared &vbdpl-idnkd& since i need to get the value of this variable. In script i have written IL    ,,&VBDPL-POSNR+03(03)&,,&ZPRN_MTRL&,, /:     INCLUDE YTEST OBJECT

  • Small letters in guide display quide

    letters too small on xfinity x1 guide displays