Calling stored procedure from Perl Script

Need help with the syntax to call a stored procedure with an input paramter using Perl. The input paramter will be set within the perl script.

there is an oracle module you can find on cpan
http://cpan.org/modules/by-category/07_Database_Interfaces/Oracle
of course, you could also use sqlplus binary, as you would do in shell
hth

Similar Messages

  • Calling stored procedure from php script.

    I have the following stored procedure in Oracle 8:
    CREATE OR REPLACE procedure kunde_create
    (iname1 in varchar2,
    iname2 in varchar2,
    iname3 in varchar2,
    ianrede in number,
    istrasse in varchar2,
    iland varchar2,
    iplz in varchar2,
    iort in varchar2,
    iortsteil in varchar2,
    itelefon in varchar2,
    iemail in varchar2,
    itelefax in varchar2,
    imobil in varchar2,
    ianrufer in varchar2,
    izusinfo in varchar2,
    izusatz2 in varchar2,
    okdnr out varchar2)
    is
    vkndnr number;
    vadrnr number;
    vkdnr varchar2(15);
    ikugru constant number:=4;
    minkdnr constant varchar2(15):='44000000';
    maxkdnr constant varchar2(15):='50000000';
    begin
    ..... SOME CODE ....
    okdnr:='something_to_output';
    commit;
    end kunde_create;
    I am trying to call this SP from a php script, in this way:
    $connection = ora_logon("username@db", "password");
    $cursor = ora_open($connection);
    ora_commitoff($connection);
    $cu=ora_parse($cursor, "begin KW.kunde_create ( :Sta_nameD, :Sta_name2D, :Sta_kugruD, :ianredeD, :Sta_straD, :Sta_landD, :Sta_plzD, :Sta_ortD, :Sta_ortsteilD, :Sta_telD, :Sta_mailD, :Sta_faxD, :Sta_tel2D, :Sta_anruD, :Sta_zusD, :Sta_zus2D ,:okdnr); end;");
    ora_bind($cursor, ":Sta_nameD", $Sta_nameD, 32, 1);
    ora_bind($cursor, ":Sta_name2D", $Sta_name2D, 32, 1);
    ora_bind($cursor, ":ianredeD", $ianredeD, 32, 1);
    ora_bind($cursor, ":Sta_straD", $Sta_straD, 32, 1);
    ora_bind($cursor, ":Sta_landD", $Sta_landD, 32, 1);
    ora_bind($cursor, ":Sta_plzD", $Sta_plzD, 32, 1);
    ora_bind($cursor, ":Sta_ortD", $Sta_ortD, 32, 1);
    ora_bind($cursor, ":Sta_ortsteilD", $Sta_ortsteilD, 32, 1);
    ora_bind($cursor, ":Sta_telD", $Sta_telD, 32, 1);
    ora_bind($cursor, ":Sta_mailD", $Sta_mailD, 32, 1);
    ora_bind($cursor, ":Sta_faxD", $Sta_faxD, 32, 1);
    ora_bind($cursor, ":Sta_tel2D", $Sta_tel2D, 32, 1);
    ora_bind($cursor, ":Sta_anruD", $Sta_anruD, 32, 1);
    ora_bind($cursor, ":Sta_zusD", $Sta_zusD, 32, 1);
    ora_bind($cursor, ":Sta_zus2D", $Sta_zus2D, 32, 1);
    ora_bind($cursor, ":okdnr", $okdnr, 32, 2);
    ora_exec($cursor); //Line 93
    This code brings me back this error:
    Warning: Can't find variable for parameter in /www/vaillant/htdocs/www_tisweb/html/php/testdb/connect.php on line 93
    I tried nearlly everything, but it doesnt work :(
    Can anybody help me please.
    Thanx in advance,
    Ahmed Adaileh

    I had to make a few modifications to get your example to work. The
    biggest change was to the ora_bind syntax. I also found I had to
    define a variable to hold the OUT value before doing the ora_exec.
    Otherwise I got the error you saw. I'm not sure why defining it first
    is necessary. I didn't dig deeply into PHP's oracle.c code.
    My final script is below. It displays "okdnr is something_to_output".
    I tested using PHP 4.3.3 against Oracle 9.2.
    The best general suggestion I can make is to use PHP's oci8 driver
    unless you need to be compatible with existing PHP code. There is an
    example of using OUT binds in oci8 to call a stored procedure at
    PHP and serveroutput
    -- CJ
    <?php
    // Changed connection details to suit my environment
    $connection = ora_logon("scott@MYDB", "tiger");
    $cursor = ora_open($connection);
    ora_commitoff($connection);
    // Changed schema to SCOTT to match who I'd created the procedure as
    $cu=ora_parse($cursor, "begin SCOTT.kunde_create ( :Sta_nameD, :Sta_name2D, :Sta_kugruD, :ianredeD, :Sta_straD, :Sta_landD, :Sta_plzD, :Sta_ortD, :Sta_ortsteilD, :Sta_telD, :Sta_mailD, :Sta_faxD, :Sta_tel2D, :Sta_anruD, :Sta_zusD, :Sta_zus2D ,:okdnr); end;");
    // Allocated the IN parameter variables
    $Sta_nameD      = 'a';
    $Sta_name2D     = 'a';
    $ianredeD       = 1;
    $Sta_straD      = 'a';
    $Sta_landD      = 'a';
    $Sta_plzD       = 'a';
    $Sta_ortD       = 'a';
    $Sta_ortsteilD  = 'a';
    $Sta_telD       = 'a';
    $Sta_mailD      = 'a';
    $Sta_faxD       = 'a';
    $Sta_tel2D      = 'a';
    $Sta_anruD      = 'a';
    $Sta_zusD       = 'a';
    $Sta_zus2D      = 'a';
    $Sta_kugruD     = 'a';
    // Changed ora_bind syntax to match
    // http://www.php.net/manual/en/function.ora-bind.php
    ora_bind($cursor, "Sta_nameD", ":Sta_nameD", 32, 1);
    ora_bind($cursor, "Sta_name2D", ":Sta_name2D", 32, 1);
    // Change ianredeD type to 2 to match procedure definition
    ora_bind($cursor, "ianredeD", ":ianredeD", 32, 2);
    ora_bind($cursor, "Sta_straD", ":Sta_straD", 32, 1);
    ora_bind($cursor, "Sta_landD", ":Sta_landD", 32, 1);
    ora_bind($cursor, "Sta_plzD", ":Sta_plzD", 32, 1);
    ora_bind($cursor, "Sta_ortD", ":Sta_ortD", 32, 1);
    ora_bind($cursor, "Sta_ortsteilD", ":Sta_ortsteilD", 32, 1);
    ora_bind($cursor, "Sta_telD", ":Sta_telD", 32, 1);
    ora_bind($cursor, "Sta_mailD", ":Sta_mailD", 32, 1);
    ora_bind($cursor, "Sta_faxD", ":Sta_faxD", 32, 1);
    ora_bind($cursor, "Sta_tel2D", ":Sta_tel2D", 32, 1);
    ora_bind($cursor, "Sta_anruD", ":Sta_anruD", 32, 1);
    ora_bind($cursor, "Sta_zusD", ":Sta_zusD", 32, 1);
    ora_bind($cursor, "Sta_zus2D", ":Sta_zus2D", 32, 1);
    // Changed okdnr type to 1 to match procedure definition
    ora_bind($cursor, "okdnr", ":okdnr", 32, 1);
    // Bound missing parameter
    ora_bind($cursor, "Sta_kugruD", ":Sta_kugruD", 32, 1);
    // Preallocated the output variable - I'm not sure why this is
    // necessary nor what size is needed.
    // When this line is commented out I get:
    //   Warning: Can't find variable for parameter in test01.php on line XX
    $okdnr = "a";
    ora_exec($cursor);
    print "okdnr is $okdnr";
    ?>

  • Calling Stored Procedure from Oracle DataBase using Sender JDBC (JDBC-JMS)

    Hi All,
    We have requirement to move the data from Database to Queue (Interface Flow: JDBC -> JMS).
    Database is Oracle.
    *Based on Event, data will be triggered into two tables: XX & YY. This event occurs twice daily.
    Take one field: 'aa' in XX and compare it with the field: 'pp' in YY.
    If both are equal, then
         if the field: 'qq' in YY table equals to "Add" then take the data from the view table: 'Add_View'.
         else  if the field: 'qq' in YY table equals to "Modify"  then take the data from the view table: 'Modify_View'.
    Finally, We need to archive the selected data from the respective view table.*
    From each table, data will come differently, means with different field names.
    I thought of call Stored Procedure from Sender JDBC Adapter for the above requirement.
    But I heard that, we cannot call stored procedure in Oracle through Sender JDBC as it returns Cursor instead of ResultSet.
    Is there any way other than Stored Procedure?
    How to handle Data Types as data is coming from two different tables?
    Can we create one data type for two tables?
    Is BPM required for this to collect data from two different tables?
    Can somebody guide me on how to handle this?
    Waiting eagerly for help which will be rewarded.
    Thanks and Regards,
    Jyothirmayi.

    Hi Gopal,
    Thank you for your reply.
    >Is there any way other than Stored Procedure?
    Can you try configuring sender adapter to poll the data in intervals. You can configure Automatic TIme planning (ATP) in the sender jdbc channel.
    I need to select the data from different tables based on some conditions. Let me simplify that.
    Suppose Table1 contains 'n' no of rows. For each row, I need to test two conditions where only one condition will be satisfied. If 1st condition is satisfied, then data needs to be taken from Table2 else data needs to be taken from Table3.
    How can we meet this by configuring sender adapter with ATP?
    ================================================================================================
    >How to handle Data Types as data is coming from two different tables?
    If you use join query in the select statement field of the channel then whatever you need select fields will be returned. This might be fields of two tables. your datatype fields are combination of two diff table.
    we need to take data only from one table at a time. It is not join of two tables.
    ================================================================================================
    Thanks,
    Jyothirmayi.

  • Calling stored procedure from EJB in JSever

    I have some trouble to call stored procedure from EJB deployed to JServer on Oracle8i (815).
    I have been able to sucessfully test the stored procedure using thin client JDBC driver. But when I user the default connection in JServer, the stored procedure never got called. Is there any restriction of EJB in JServer?
    Thanks
    null

    Thanks man! that was a great help. looks like i am almost there. i created those items t obe hidden.
    now i am passing three parameters to the procedure. my url for that column value looks like this,
    javascript:P65_PARTITION_ID=#PARTITION_ID#;P65_DBC=#DBC#;P65_FILE_ID=#FILE_ID#;doSubmit('Sku_Save');
    the #DBC# parameter is a name of the person that has spaces(firstname lastname). i am getting a javascript error saying,
    Line: 1
    Char: 37
    Error:Expected ';'
    i see that char 37 is the space after firstname.
    any idea how i should get rid of this error.
    Also, as you have been very helpful, a question further beyond :). the above procedure will return a OUT varchar parameter. i guess i have to create another item for that. how do i read it and display just below my report as text.
    Thanks Again!

  • How to use @jws:sql call Stored Procedure from Workshop

    Is there anyone know how to use @jws tag call Sybase stored procedure within
    Workshop,
    Thanks,

    Anurag,
    Do you know is there any plan to add this feature in future release? and
    when?
    Thanks,
    David
    "Anurag Pareek" <[email protected]> wrote in message
    news:[email protected]..
    David,
    In the current release, we do not support calling stored procedures from a
    database control. You will have to write JDBC code in the JWS file to call
    stored procedures.
    Regards,
    Anurag
    Workshop Support
    "David Yuan" <[email protected]> wrote in message
    news:[email protected]..
    Anurag,
    I know how to use DB connection pool and create a db control with it. In
    fact, we have created a Web Service with the db control using plain SQL
    in
    @jws:sql. However, my question here is how to use @jws tag in Weblogic
    Workshop to create a Web Services based on Sybase stored procedure orany
    Stored Proc not plain SQL.
    Thanks,
    David
    "Anurag Pareek" <[email protected]> wrote in message
    news:[email protected]..
    David,
    You can use a database control to obtain a connection from any JDBC
    Connection Pool configured in the config.xml file. The JDBC Connectionpool
    could be connecting to any database, the database control is
    independent
    of
    that.
    Regards,
    Anurag
    Workshop Support
    "David Yuan" <[email protected]> wrote in message
    news:[email protected]..
    Is there anyone know how to use @jws tag call Sybase stored
    procedure
    within
    Workshop,
    Thanks,

  • Calling stored procedure from DAC

    Anyone has instructions on calling stored procedures from DAC. If I had a stored procedure called gary.refresh, where would I put that in the DAC. How do I specify the database that my stored procedure is in.. There doesn't seem to be any examples of this in the documentation for DAC administration
    Edited by: user8092687 on Jun 6, 2011 7:51 AM

    You have 3 options.
    Option 1:
    Create an SQL file that runs the stored proc. For instance, if
    your stored proc is called "aggregate_proc" you would create a
    file called aggregate_proc.sql that has the syntax to run the
    stored proc. Put the file in the CustomSQLs directory that hangs
    off the DAC main directory. Then, in the DAC, create a new task
    (Execution Type = SQL File). The command for Incremental Load
    would be aggregate_proc.sql.
    Option 2:
    Create an Informatica mapping (and corresponding workflow) that
    runs the stored proc. Then create a DAC task (Execution type Informatica) that runs the workflow.
    Option 3 :
    Directly mention Schema.procedure name in the DAC task
    Hope this helps,
    - Amith

  • How to call stored procedure from Pro*C

    How to call stored procedure from Pro*C ?
    my system spec is SuSE Linux 9.1, gcc version : 3.3.3, oracle : 10g
    my Pro*C code is the following..
    EXEC SQL EXECUTE
    begin
    test_procedure();
    end;
    END-EXEC;
    the test_procedure() has a simple update statement. and it works well in SQL Plus consol. but in Pro*C, there is a precompile error.
    will anybody help me what is the problem ??

    I'm in the process of moving C files (with embedded SQL, .PC files) from Unix to Linux. One program I was trying to compile had this piece of code that called an Oracle function (a standalone), which compiled on Unix, but gives errors on Linux:
    EXEC SQL EXECUTE
    BEGIN
    :r_stat := TESTSPEC.WEATHER_CHECK();
    END;
    END-EXEC;
    A call similar to this is in another .PC file which compiled on Linux with no problem. Here is what the ".lis" file had:
    Pro*C/C++: Release 10.2.0.1.0 - Production on Mon Jun 12 09:26:08 2006
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    Error at line 193, column 5 in file weather_check.pc
    193 BEGIN
    193 ....1
    193 PCC-S-02346, PL/SQL found semantic errors
    Error at line 194, column 8 in file weather_check.pc
    194 :r_stat := TESTSPEC.WEATHER_CHECK();
    194 .......1
    194 PLS-S-00000, Statement ignored
    Error at line 194, column 18 in file weather_check.pc
    194 :r_stat := TESTSPEC.WEATHER_CHECK();
    194 .................1
    194 PLS-S-00201, identifier 'TESTSPEC.WEATHER_CHECK' must be declared
    Pro*C/C++: Release 10.2.0.1.0 - Production on Mon Jun 12 09:26:08 2006
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    System default option values taken from: /oracle_client/product/v10r2/precomp/ad
    min/pcscfg.cfg
    Error at line 194, column 18 in file weather_check.pc
    :r_stat := TESTSPEC.WEATHER_CHECK();
    .................1
    PLS-S-00201, identifier 'TESTSPEC.WEATHER_CHECK' must be declared
    Error at line 194, column 8 in file weather_check.pc
    :r_stat := TESTSPEC.WEATHER_CHECK();
    .......1
    PLS-S-00000, Statement ignored
    Semantic error at line 193, column 5, file weather_check.pc:
    BEGIN
    ....1
    PCC-S-02346, PL/SQL found semantic errors

  • Calling stored procedures from entity object and application module

    Hello
    I've put in place an EntiyImpl base class containg helper methods to call stored procedures.
    I now need to call stored procedures from the application module.
    Apart from creating an application module base class and duplicating the helper method code is there a way
    to share the helper methods for calling stored procedures between the entity impl and application module impl ?
    Regards
    Paul

    Does the helper code depend on features of a particular entity object instance, beyond its database transaction?
    If so, I'm not sure I see how it could be used from an application module class.
    If not, here's what you do:
    Step 1:
    Parametrize the database transaction--you might even want to. So instead of
    protected myHelperMethod(Object someParam) {
    DBTransaction trans = getDBTransaction();
    change this to
    protected myHelperMethod(DBTransaction trans, Object someParam) {
    Step 2: make the method public and static--once you parameterize the DBTransaction, you should be able to do this.
    public static myHelperMethod(DBTransaction trans, Object someParam) {
    Step 3: Remove the method from your EntityImpl base class into a utility class:
    public abstract class PlSqlUtils {
    private PlSqlUtils() {}
    public static myHelperMethod(DBTransaction trans, Object someParam) {
    When you want to call the method from an application module, entity object, or even view object class, call
    PlSqlUtils.myHelperMethod(getDBTransaction(), paramValue);
    Unlike Transaction.executeCommand(), this lets you provide functionality like setting procedure parameter values, retrieving OUT parameter values, etc.
    Hope this helps,
    Avrom

  • Calling Stored Procedures from Discoverer

    Does anyone know if I can call stored procedures from Discoverer? I know it supports Registered PL/SQL functions. If yes, can I find any documentation. Any information will be very helpful.
    Thanks in advance!
    Ning

    One way I can think of to do that would be to use function with pragma restrict references. You can then use the function as a column in a SQL query to make a folder in Discoverer.

  • Calling stored procedure from script on remote server

    We are migrating our database to a virtual server environment. On the current dedicated environment, the database and scripts(calling stored procedures) are on the same server. In the new envoirnment, the scripts, input and output files will be on a different server. Does anyone have any examples of scripts on one server calling stored procedures on another server. Don't laugh, but the db server is currently running Oracle 9i (part of the new enviornment to move to 11g).

    brifry wrote:
    sorry my terminolgy is not correct. the stored procedure is in the database and the database is on server a. The script is on server b. In your example you show how to log onto the database. That I know. In your example your example, how would you point to server b so you can log onto the database?Do you want to mean that your procedure (location A) want to call a script from location B ?
    make the script located folder as shared and ,You may try this
    //server_name/folder_name/file_name.xxxHope this helps

  • Calling stored procedure from unix shell script

    Hello,
    I am facing a problem while calling a stored procedure from UNIX shell script. I want to return a output variable from the stored procedure to the UNIX environment.
    Here is the code-
    #!/bin/sh
    OUTPUT=`sqlplus cmag/magnum@dw <<ENDOFSQL
    set serveroutput on;
    var prd_out varchar2(100);
    exec create_pm_window(:prd_out);
    exit;
    ENDOFSQL`
    echo " output is - $OUTPUT"
    The problem is :prd_out is not getting copied to shell variable OUTPUT.
    I have a dbms_output.put_line in the stored proc create_pm_window and I can see that prd_out is getting populated.
    Any help is really appreciated.
    Thanks'
    Rakhee

    First step :
    make sure the PL/SQL works as expected.
    Does the following display the expected output executed from SQL*Plus ?
    set serverout on
    declare
    prd_out varchar2(100);
    begin
    create_pm_window(prd_out);
    dbms_output.put_line('output is '||prd_out);
    end;
    I don't have your procedure, but using a dummy procedure like :
    Scott@my10g SQL>create procedure foo(p_out in out varchar2)   
      2  is
      3  begin
      4  select 'Hello '||instance_name into p_out from v$instance;
      5  end;
      6  /
    Procedure created. and a toto.sh script as :OUTPUT=`sqlplus -s scott/tiger <<EOF
    set pages 0 lines 120 trimout on trimspool on tab off echo off verify off feed off serverout on
    var mavar varchar2(100);
    exec foo(:mavar);
    print mavar;
    exit;
    EOF`
    echo "OUT = ${OUTPUT}"
    exitIt works fine :[oracle@Nicosa-oel ~]$ ./toto.sh
    OUT = Hello my10g

  • Calling pl/sql stored procedure from shell script ( kshell)

    hello.,
    i have written a stored procedure. i need to call this stored procedure from a unix shell script ( korn shell).
    can anyone please help me how can i do it.actually there are 3 stored procedures. so my shell script has to call each stored procedure, execute it then go to next stored procedure execute it.
    if by chance inbetween any stored procedure do not execute then the shell script has to tell me that this stored procedure failed to execute.
    please help me in this.
    thanks
    madan

    Sorry Madan,
    Following is the complete solutiion:
    !# /usr/bin/ksh
    sqlplus -s user/pass@server << EOF > a.log
    exec proc1;
    exec proc2;
    exec proc3;EOF
    if [ $? -eq 0 ]
    then
            echo "\n Procedures completed successfully at `date`"
    else
            echo "!!! FAILED!!!"
            echo "Details can be found in a.log File"
    fi

  • CAlling stored procedure from Dashboard

    Hi,
    I am new to this OBIEE.I have one requirement like I have to call a stored procedure from Dashboard.How can i do this?

    Hi ,
    With what action in the dashboard would you like to call the stored procedure? For eg. you can call a procedure when a user Write backs (Writeback feature in OBIEE) to the db. In this case you create a new connection pool exclusively for this writeback report and this connection pool you have a tab namely Connection Script where in you can call a stored procedure.
    Hope this helps.
    Please mark as helpful if this helps you
    Regards

  • Error while calling stored procedure from Java

    Hi Guys,
    How are you everybody? I hope everything is goin fine on your side. I have one issue in PL/SQL while calling below stored procedures from Java.
    Problem Description: We have a stored procedure PROCEDURE BULK_INSERTS (
    V_SESSION_ID_TAB IN T_SESSION_ID_TAB_TYPE,
    V_SERVICE_TYPE_TAB IN T_SERVICE_TYPE_TAB_TYPE,
    V_SERVICE_LOCATION_TAB IN T_SERVICE_LOCATION_TAB_TYPE,
    V_SERVICE_CALL_NAME_TAB IN T_SERVICE_CALL_NAME_TAB_TYPE,
    V_SERVICE_CALL_START_TIME_TAB IN T_SERVICE_CALL_ST_TAB_TYPE,
    V_SERVICE_CALL_END_TIME_TAB IN T_SERVICE_CALL_ET_TAB_TYPE,
    V_SERVICE_CALL_DURATION_TAB IN T_SERVICE_CALL_DUR_TAB_TYPE,
    V_STATUS_TAB IN T_STATUS_TAB_TYPE,
    V_NOTES_TAB IN T_NOTES_TAB_TYPE
    ) and we are getting ora errors while calling this stored procedure from java.
    All tab types are declared locally, at package level.
    Here is error which occur while calling this sp:
    {call BULK_PKG.BULK_INSERTS(?,?,?,?,?,?,?,?,?)}
    And the parameter types we are using are:
    SESSION_ID - NUM_TAB_TYPE
    SERVICE_TYPE - VAR_TAB_TYPE
    SERVICE_LOCATION - VAR_TAB_TYPE
    SERVICE_CALL_NAME - VAR_TAB_TYPE
    SERVICE_CALL_START_TIME - DATE_TIME_TAB_TYPE
    SERVICE_CALL_END_TIME - DATE_TIME_TAB_TYPE
    SERVICE_CALL_DURATION - NUM_TAB_TYPE
    STATUS - VAR_TAB_TYPE
    NOTES - VAR_TAB_TYPE
    And the Exception stack trace is:
    ERROR (com.att.retail.r2d2.persistence.dao.ExternalServiceCallDAO.saveExternalServiceCallInfo(ExternalServi
    ceCallDAO.java:143)@ExecuteThread: '252' for queue: 'weblogic.kernel.Default') {Error attempting to save collected ESC data}
    java.sql.SQLException: ORA-06550: line 1, column 7:
    PLS-00306: wrong number or types of arguments in call to 'BULK_INSERTS'
    ORA-06550: line 1, column 7:
    PLS-00306: wrong number or types of arguments in call to 'BULK_INSERTS'
    ORA-06550: line 1, column 7:
    PLS-00306: wrong number or types of arguments in call to 'BULK_INSERTS'
    ORA-06550: line 1, column 7:
    PLS-00306: wrong number or types of arguments in call to 'BULK_INSERTS'
    ORA-06550: line 1, column 7:
    PLS-00306: wrong number or types of arguments in call to 'BULK_INSERTS'
    ORA-06550: line 1, column 7:
    PLS-00306: wrong number or types of arguments in call to 'BULK_INSERTS'
    ORA-06550: line 1, column 7:
    PLS-00306: wrong number or types of arguments in call to 'BULK_INSERTS'
    ORA-06550: line 1, column 7:
    PLS-00306: wrong number or types of arguments in call to 'BULK_INSERTS'
    ORA-06550: line 1, column 7:
    PLS-00306: wrong number or types of arguments in call to 'BULK_INSERTS'
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:70)
    at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:112)
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:173)
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:455)
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:413)
    at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:1030)
    at oracle.jdbc.driver.T4CCallableStatement.doOall8(T4CCallableStatement.java:191)
    at oracle.jdbc.driver.T4CCallableStatement.executeForRows(T4CCallableStatement.java:944)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1222)
    at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3381)
    at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3482)
    at oracle.jdbc.driver.OracleCallableStatement.execute(OracleCallableStatement.java:3856)
    at oracle.jdbc.driver.OraclePreparedStatementWrapper.execute(OraclePreparedStatementWrapper.java:1373)
    at weblogic.jdbc.wrapper.PreparedStatement.execute(PreparedStatement.java:98)
    at com.att.retail.r2d2.persistence.dao.ExternalServiceCallDAO.doBulkInsert(ExternalServiceCallDAO.java:220)
    at com.att.retail.r2d2.persistence.dao.ExternalServiceCallDAO.saveExternalServiceCallInfo(ExternalServiceCallDAO.java:138)
    Please help my guys out of this. I will really appreciate all suggestions and advices.
    Thank you everybody.

    I am trying to pass parameter to test my procedure but it is giving this error : ORA-06531: Reference to uninitialized collection
    ORA-06512: at line 12
    Here is example for my test procedure:
    declare
    v_session_id_tab SESSION_ID_TAB_TYPE;
    v_service_type_tab SERVICE_TYPE_TAB_TYPE ;
    v_service_location_tab SERVICE_LOCATION_TAB_TYPE ;
    v_service_call_name_tab SERVICE_CALL_NAME_TAB_TYPE;
    v_service_call_start_time_tab SERVICE_CALL_ST_TAB_TYPE;
    v_service_call_end_time_tab SERVICE_CALL_ET_TAB_TYPE;
    v_service_call_duration_tab SERVICE_CALL_DUR_TAB_TYPE;
    v_status_tab STATUS_TAB_TYPE;
    v_notes_tab NOTES_TAB_TYPE;
    begin
    v_session_id_tab(1) := 1;
    v_service_type_tab(1) := 'db';
    v_service_location_tab(1) := 'local';
    v_service_call_name_tab(1) := 'Name of call';
    v_service_call_start_time_tab(1) := SYSDATE;
    v_service_call_end_time_tab(1) := SYSDATE;
    v_service_call_duration_tab(1) := 100;
    v_status_tab(1) := 'Z';
    v_notes_tab(1) := 'NOTES';
    BULK_INSERTS (v_session_id_tab,v_service_type_tab, v_service_location_tab,v_service_call_name_tab,v_service_call_start_time_tab,v_service_call_end_time_tab,
    v_service_call_duration_tab, v_status_tab, v_notes_tab);
    end;
    I declare all types at schema level.
    Please give your comments.
    Thank you

  • Calling stored procedure from a column in report

    Hi All,
    I am new to APEX. I did a search on this forum but couldnt get an exact answer.
    I know how to call or execute a stored procedure from a button. like create a PL/SQL anonymous bloack and asssociate it with the button.
    my issue is a bit different. I have a report with 11 columns. the last column just says 'delete' for all the rows(i did this in my report query like SELECT x,y,z,...., 'delete' AS delete). when i click this cell for any row(this column can be a hyperlink or any clickable element), i want to call a stored procedure that takes parameters as the values in column 2 and column 4 for that particular row.
    for example, my report looks somethnig like below,
    FILE_ID MEMBER_CD ACTION
    112 ABCD delete
    113 WXYYZ delete
    114 PQRS delete
    i want to click the 'delete' in first row that should call a stored procedure and pass 112 and ABCD as parameters to the procedure.
    i have the procedure as a process now. sturggling to bind this column to procedure but no success :(
    Hope am clear. Please any help is appreciated.
    Thanks

    Thanks man! that was a great help. looks like i am almost there. i created those items t obe hidden.
    now i am passing three parameters to the procedure. my url for that column value looks like this,
    javascript:P65_PARTITION_ID=#PARTITION_ID#;P65_DBC=#DBC#;P65_FILE_ID=#FILE_ID#;doSubmit('Sku_Save');
    the #DBC# parameter is a name of the person that has spaces(firstname lastname). i am getting a javascript error saying,
    Line: 1
    Char: 37
    Error:Expected ';'
    i see that char 37 is the space after firstname.
    any idea how i should get rid of this error.
    Also, as you have been very helpful, a question further beyond :). the above procedure will return a OUT varchar parameter. i guess i have to create another item for that. how do i read it and display just below my report as text.
    Thanks Again!

Maybe you are looking for

  • My trackpad wont register when i click down on both sides. I have a MBP from 2009.

    Just yesterday my mouse was going crazy moving all over the place and clicking everything and so i restarted it. Then when i turned my MBP back on it worked fine for a few minutes and then went crazy after a while. I left it alone the whole night and

  • Use of Events in a program

    What is the usage of events like initialization ,start-of-slectio,end-of-selection in a program, what if we write a program with out those events can we use initialization twice in a program like initialization start-of-selection initialization end-o

  • Transfer of the parameters to the class

    Merry Cristmas and Happy New Year to everyone! I have the following problem I have a class      public class Automat public static int col; int D_size,ia,ja; float x_coord,y_coord; double fy,fx,fxy; double [] angle; Material mat; Automat(int dsize, i

  • FillColor in CS3

    Hi, The below line works well in InDesign CS2 to apply fill color : ......words[0].fillColor=app.activeDocument.swatches.item("cyan"); But the same line doesn't work in InDesign CS3. What has suppose changed in "fillColor" syntax. Please guide me. Sa

  • BI Content for QM modul

    Hi, my customer would like to implement a common business practice for ERP QM module - used in a pharmaceutical company. Are there any Best practice scenarios or BC objects to cover that area (specially for pharma) Thanks, Tomaz