JReport Designer - oracle stored procedure-PLS HELP!!!!

Hi,
I am using Jreport designer with oracle data base. I wanted to layout a report with oracle stored procedure which returns a REF CURSOR. I tried adding OracleProcedureUDS in user data source thru catalog browser. I gave the params as DRIVER=oracle.jdbc.driver.OracleDriver&URL="jdbc:oracle:thin:@10.10.1.177:1521:ORCL"
&USER=<myuser>&PSWD=<mypwd>&PROCNAME=empquery&SQL={ call empquery(?) }
&REFCURSORINDEX=1
but on pressing OK, i get the error ,
java.lang.NullPointerException
at jet.datasource.oracle.OracleProcedureUDS.getProcedureParams(jet/datas
ource/oracle/OracleProcedureUDS)
at jet.datasource.oracle.OracleProcedureUDS.getResultSet(jet/datasource/
oracle/OracleProcedureUDS)
at jet.universe.engine.UUDSEngine._getResultSet(jet/universe/engine/UUDS
Engine)
at jet.universe.engine.UQueryEngine.getResultSet(jet/universe/engine/UQu
eryEngine)
at jet.rptengine.JReportEngine.run(jet/rptengine/JReportEngine)
at java.lang.Thread.run(Thread.java:536)
java.lang.NullPointerException
at jet.datasource.oracle.OracleProcedureUDS.getProcedureParams(jet/datas
ource/oracle/OracleProcedureUDS)
at jet.datasource.oracle.OracleProcedureUDS.getResultSet(jet/datasource/
oracle/OracleProcedureUDS)
at jet.universe.engine.UUDSEngine._getResultSet(jet/universe/engine/UUDS
Engine)
at jet.universe.engine.UQueryEngine.getResultSet(jet/universe/engine/UQu
eryEngine)
at jet.rptengine.JReportEngine.run(jet/rptengine/JReportEngine)
at java.lang.Thread.run(Thread.java:536)
note: I have added the classpath C:\oracle\ora92\jdbc\lib\class111.zip which contains the classes in package oracle.jdbc.driver, as per the user guide.
also this is my stored procedure which got created successfully:
CREATE OR REPLACE PACKAGE SHDEMO as
type curtype is ref cursor;
END SHDEMO;
CREATE OR REPLACE PROCEDURE empquery (cur OUT SHDEMO.curtype) as
lcur SHDEMO.curtype;
begin
open lcur for
select * from intf_hr_employee;
cur:=lcur;
END empquery;
pls somebody help me. I have wasted 2 days on this.
Thanks,
Swathi

Hi,
i fixed the bug. it was because i excluded &OWNER=<MYOWNER> in the param list.
Thanks,
Swathi

Similar Messages

  • Sybase to Oracle Stored Procedure migration Help

    Hello,
    There is a Stored Procedure in Sybase and needs to be migrated to Oracle 10g. I need some quick help in creating temporary table and store the result set temporary. Here's the script.
    Select distinct WC_POSITION_D.WID,
    WC_POSITION_D.POSITION_NAME,
              WC_POSITION_D.CURR_MTH_CAPACITY,
    WC_POSITION_D.NEXT_MTH_CAPACITY into #capcity
    from WC_POSITION_D
    ***********Below SQL extract no.of skills per position for the currentMonth Active ********************
    select WC_POSN_SKILL_F.POSN_WID,
    count(WC_POSN_SKILL_F.SKILL_WID) as curr_skills into #currskills
    from WC_POSN_SKILL_F
    where WC_POSN_SKILL_F.Flag = 'A'
    group by WC_POSN_SKILL_F.POSN_WID
    ***********Below SQL extract no.of skills per position for the NextMonth Active ********************
    select WC_POSN_SKILL_F.POSN_WID,
    count(WC_POSN_SKILL_F.SKILL_WID) as next_skills into #nextskills
    from WC_POSN_SKILL_F
    group by WC_POSN_SKILL_F.POSN_WID
    ***********Below SQL calculates CURR_MNTH_DMD,NEXT_MNTH_EXP_DMD per position ********************
    select #capacity.WID,
    ((#capacity.CURR_MTH_CAPACITY)/curr_skills) as CURR_MTH_DMD,
         ((#capacity.NEXT_MTH_CAPACITY)/next_skills) as NEXT_MTH_DMD into #demand
    from #capacity, #skills
    where #capacity.WID = #skills.POSN_WID
    ***********Below statement populate CURR_MNTH_DMD,NEXT_MNTH_EXP_DMD in WC_POSN_SKILL_F ********************
    UPDATE WC_POSN_SKILL_F
    set WC_POSN_SKILL_F.CURR_MNTH_DMD = #demand.CURR_MTH_DMD, WC_POSN_SKILL_F.NEXT_MNTH_EXP_DMD = #demand.NEXT_MTH_DMD
    from WC_POSN_SKILL_F,#demand
    where WC_POSN_SKILL_F.POSN_WID = #demand.WID
    any kind of immediate help/input appreciated.

    Be careful porting code like this directly. Reason:
    The reasons for using Temporary Tables in Sybase is invalid in Oracle.
    In Sybase one needs to minimize locks and lock contention and escalation. This is done using temporary tables. Your Sybase script is typical of this approach - which is valid in Sybase.
    However, this is not valid in Oracle. Oracle is at its core designed very differently from Sybase. A single lock in Oracle has the same overheads as a million locks - none. In Oracle, readers-of-data cannot block writers-of-data and vice versa. In Oracle there is no lock escalation - ever. This concept/problem does not exist. Period.
    Porting your Sybase code to Oracle will be an attempt at using Oracle as a Sybase. Oracle is a very poor Sybase.
    I urge you not to do a direct port. You will become very frustrated with Oracle. You will conclude that Oracle sucks. Use Oracle as it has been designed.. or IMO, bluntly put, do not use it all.

  • PLS-00306:NET to call Oracle stored procedure,Use Array parameters

    Development Environment:Windows 2003 SP2+Oracle 10g
    . NET to call Oracle stored procedure, use an array of types of parameters
    Step1:(In the Oracle database define an array of types)
    CREATE OR REPLACE TYPE STRING_VARRAY AS VARRAY (1000) OF NVARCHAR2(255)
    OR
    CREATE OR REPLACE type string_array is table of nvarchar2(255)
    Step2:
    CREATE OR REPLACE PROCEDURE Test
    (i_test in string_varray,o_result out int)
    IS
    BEGIN
    o_result:=i_test.count;
    EXCEPTION
    WHEN NO_DATA_FOUND
    THEN
    NULL;
    WHEN OTHERS
    THEN
    o_result:=0;
    END arraytest;
    Step3:
    ODP.NET(Oracle 10g)
    OracleConnection conn = new OracleConnection("User Id=test;Password=test;Data Source=test");
    OracleCommand cmd = new OracleCommand("Test", conn);
    cmd.CommandType = CommandType.StoredProcedure;
    string[] str = new string[2] { "11", "222" };
    cmd.ArrayBindCount=2;
    OracleParameter p1 = new OracleParameter("i_test", OracleDbType.NVarChar);
    p1.Direction = ParameterDirection.Input;
    p1.CollectionType = OracleCollectionType.PLSQLAssociativeArray;
    p1.Value = str;
    p1.ArrayBindSize=new int[2]{2,3};
    p1.ArrayBindStatus = new OracleParameterStatus[2]{
    OracleParameterStatus.Success,
    OracleParameterStatus.Success
    cmd.Parameters.Add(p1);
    OracleParameter p2 = new OracleParameter("o_result", OracleDbType.Int32);
    p2.Direction = ParameterDirection.Output;
    P2.CollectionType = OracleCollectionType.PLSQLAssociativeArray;
    p2.Value=0;
    cmd.Parameters.Add(p2);
    int i = 0;
    try
    conn.Open();
    cmd.ExecuteNonQuery();
    i =(int) p2.Value;
    catch (Exception ex)
    finally
    conn.Close();
    Error:
    Execution Failed:ORA-06550:Line 1,Column 7:
    PLS-00306:Test parameters when calling the number or types of errors
    ORA-06550:Line 1,Column 7:
    PL/SQL:Statement ignored

    Hi,
    See the answer in [this thread|http://forums.oracle.com/forums/thread.jspa?threadID=909564&tstart=0]
    Hope it helps,
    Greg

  • Help : To convert Following Code into oracle Stored Procedure

    Hi All
    I m Ajay Patel
    N i m new in Oracle i don't know much abt oracle
    I want to convert following code in to oracle10g ( Procedure )
    This is PHP code n this function abt compound interest.
    $pa,$ri,$sy,$ey :- all are in parameters
    all variable declare with $
    $pa - is principle amount
    $ri - Rate
    $sy - start year - 2009
    $ey - end year - 2060
    function CCI($pa,$ri,$sy,$ey)
              $CCI = array();
              $totalyear = $ey - $sy;
              $ri = $ri/100;
              $ri= 1 + $ri;
              $amt=1;
              for($i=1;$i<=($totalyear+1);$i++)
                   if($i==1)
                        $CCI[$i][0] = $sy;
                        $CCI[$i][1] = $pa;
                   else
                        $powvalue = 1;
                        for($k=1;$k<$i;$k++)
                             $powvalue = $ri * $powvalue;
                        $FinalValue = $pa * $powvalue;
                        $CCI[$i][0] = $sy;
                        $pos = strpos($FinalValue, '.');
                        if ($pos !== false)
                             $FinalValue =     substr($FinalValue, 0, $pos+3 );
                        $CCI[$i][1] = $FinalValue ;
                   $sy++;
              return $CCI;
    Pls Help Me to convert above code in to oracle stored procedure
    Thanks All
    Regards,
    Ajay

    Its time to start reading the Document .

  • Help Required on Cross Referencing with Oracle Stored Procedure

    Hi Experts,
       I have a requirement which is having the requirements as follow,
    Web Application initially sends a request number to SAP ECC to fetch the response details through SAP PI (HTTP to RFC u2013 Synchronous). While fetching the response from SAP ECC system, SAP PI has to invoke a Oracle Stored Procedure based on some parameter from SAP ECC System and then composited data has to send back to Web Application by SAP PI.
    Request you to kindly suggest how to achieve the above.  JDBC lookup is not much extended to call stored procedure. It would be helpful if it will be a step by step as I am novice to SAP PI.
    Regards
    Archana

    you might very well have to use a BPM.
    open a sync/async bridge ->
    do a sync call to RFC ->
    Do a sync call to DB (use SP here) ->
    do a transformation from the response message of RFC and Response of DB (N:1) to for your response to original caller (http)
    Close the sync async bridge using the response message

  • Help with Data service built on a Oracle Stored Procedure

    Hi Friends,
    I am absolutely new to ALDSP and I have created a data service on a Oracle stored procedure. Working with ALDSP 2.5.
    The dataservice is working fine as it is retrieving the data from the database by calling the stored procedure. the signature of the procedure is as follows :
    sp_get_rpt(commID IN number,hier1 IN varchar2,hier2 IN varchar2,ref_cur Ref_cursor)
    Query 1>>
    When i executed the data service, realised that it is considering only the first parameter as compulsary. Even i do not enter the remaining parameters the SP is being
    called.
    Is there any way I can control the input parameters, in the sense that specify in the data service itself which parameter is compulsary and which one is not(could be nullable) ?
    Query 2>>
    The same case with the output that is returned by the sp, I have defined it as a XML schema. as the output of the sp is
    a ref cursor.
    the output returned by the sp, may have some fields as Null, but this is not being accepted by the o/p schema that I have defined in ALDSP.
    Please let me know how I can make some fields nullable in the o/p schema too so that the result set is returned even if some fields are null.
    -Thanks

    In DSP 2.5, there are no provisions for passing null parameters via the client API. You can pass a null parameter when calling one data service function from another data service function by passing a empty element (i.e. $CUSTOMER/MIDDLE_NAME where this particular CUSTOMER doesn't have a MIDDLE_NAME) or by passing an empty sequence (). The function argument must be defined as occuring zero or one times (i.e. $myArg as xs:string? ) the question mark indicates zero or one occurrences.
    Use the same notation to indicate that OUT args are optional.
    For returned rowsets with optional columns, indicate this with minOccurs="0" in your schema.
    I'm thinking that DSP does not handle ref_cursor arguments - but hey, if you tried it and it works, I won't argue.
    In DSP 2.5, you will need a patch from CR346161 to pass null Date (date) or TimeStamp (dateTime) elements to an Oracle stored procedure. Contact customer support if you need this patch.

  • 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

  • BO v5.1 - creating a report from an oracle stored procedure

    Post Author: newrochelle
    CA Forum: Publishing
    hi to all,
    im using BO 5.1 and i need to create a document from an oracle stored procedure that have only one IN parameter and ten OUT parameters.
    Creating the new report I selected the database connection then I choose the stored procedure name from the list, I inserted the value for the IN parameter and finally I click on Run button.
    I got the following error message:
    ORA-06550: line 1, column 38: :PLS-00103: Encountered the symbol
    "," when expecting one of the following: : : ( - + case mod
    new not null others <an identifier> : <a double-quoted
    delimited-identifier> <a bind variable> avg : count current
    exists max min prior sql stddev sum variance : execute forall
    merge time timestamp interval date : <a string literal with
    character set specification> : <a number> <a single-quoted SQL
    string> pipe : <an alternatively-quoted string literal with
    character set specification> : <an alternatively-q :-6550
    it seems to be caused by the OUT parameters!
    i leaved them without any value.
    it's the first time that I used a stored procedure to create a BO report, but I think the OUT parameters are needed to do that, otherwise what data will be presented in the report???
    can you help me?
    please answear me ASAP.
    Thank's in advance
    Regards
    Andrea

    Post Author: synapsevampire
    CA Forum: Publishing
    Try posting in a BO forum, this is Crystal Reports.
    -k

  • Invoking ORACLE Stored Procedure

    Hello guys,
    I have an ORACLE stored procedure which I need to invoke. I'm currently unable to invoke the stored procedure since I'm always getting the same error:
    com.sap.engine.interfaces.messaging.api.exception.MessagingException: Error processing request in sax parser: Error when executing statement for table/stored proc. 'test.set_pickup' (structure 'STATEMENTNAME'): java.sql.SQLException: ORA-06550: line 1, column 7: PLS-00306: wrong number or types of arguments in call to 'SET_PICKUP' ORA-06550: line 1, column 7: PL/SQL: Statement
    I've faced several projects where we needed to invoke stored procedures but these were located in a DB2 or Microsoft SQL Server, and these problems never occured.
    The procedure is set to the minimum, and is now only with one input parameter. I had an input and output parameter but for narrowing the problem I've removed the output.
    The structure for the stored procedure is the one that is referred by SAP or mentioned thousand of times in this forum:
    Statement_name
    StoredProcedureName (attribute ACTION)
      TABLE
      P_TRANSACTION_ID (Attributes isInput, isOutput, type)
    For the basics I'm only filling with one statement.
    I've read some threads with a similar problem but with no response, or solved but with no suggestion on how they solved it.
    Could you please help out?
    Kind regards,
    Gonçalo Mouro Vaz

    Hi,
    Is the structure in Oracle side is of the following format?
    <StatementName>
    <storedProcedureName action=u201D EXECUTEu201D>
        <table>realStoredProcedureeName</table>
    <param1 [isInput=u201Dtrueu201D] [isOutput=true] type=SQLDatatype>val1</param1>
    </storedProcedureName >
      </StatementName>
    Can you paste the structure here?
    Regards
    Suraj

  • JDBC Receiver to ORACLE Stored Procedure

    Hi Experts
    I browed the forum and could not find a strait answer to my problem. Hence I am posting this thread.
    I have a sync call using JDBC Receiver to ORACLE stored procedure.
    The definition of the procedure is as follows:
    CREATE OR REPLACE procedure TW.XI_TEST
        (p_edi_extract_id varchar2, p_res out edi_extract%rowtype) is
    t edi_extract%rowtype;
    begin
      select *
      into p_res
      from edi_extract e
      where e.edi_extract_id = to_number(p_edi_extract_id);
    exception
       when no_data_found then
            p_res := t;
    end XI_TEST;
    The request XML is as follows:
    <?xml version="1.0" encoding="UTF-8" ?>
    <ns0:MT_EDIExtractSelectionRequest xmlns:ns0="urn:zim.com:tests">
    <STATEMENT>
    <PROC_NAME ACTION="EXECUTE">
      <TABLE>TW.XI_TEST</TABLE>
      <EDI_EXTRACT_ID isInput="true" type="STRING">4223142</EDI_EXTRACT_ID>
      </PROC_NAME>
      </STATEMENT>
      </ns0:MT_EDIExtractSelectionRequest>
    The error I am getting is as follows:
    com.sap.engine.interfaces.messaging.api.exception.MessagingException:
    Error processing request in sax parser:
    Error when executing statement for table/stored proc. 'TW.XI_TEST' (structure 'STATEMENT'):
    java.sql.SQLException: ORA-06550: line 1, column 7: PLS-00306:
    wrong number or types of arguments in call to 'XI_TEST' ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    Any help would be appreciated.
    Regards
    Effi.

    >
    Rajesh wrote:
    > > Hi Rajesh
    > >
    > > The structure of my data type for the request query is as follows:
    > >
    > >
    DT_EDIExtractSelectionRequest (Complex Type)
    > >    STATEMENT (Element)
    > >       PROC_NAME (Element)
    > >          ACTION (Attribute) _mapped to_: EXECUTE
    > >          TABLE (Element) _mapped to_: TW.XI_TEST
    > >          EDI_EXTRACT_ID (Element) _mapped to_: 123456
    > >             isInput (Attribute) _mapped to_: true
    > >             type (Attribute) _mapped to_: STRING
    > >          EDI_EXTRACT (Element)
    > >             isOutput (Attribute) _mapped to_: true
    > >             type (Attribute) _mapped to_: CURSOR
    > >
    > >
    >
    >
    > Change the DT type to like below
    >
    >            STATEMENT (Element)
    >                   ACTION (Attribute) _mapped to_: EXECUTE
    >                   TABLE (Element) _mapped to_: TW.XI_TEST
    >                   EDI_EXTRACT_ID (Element) _mapped to_: 123456
    >                        isInput (Attribute) _mapped to_: true
    >                        type (Attribute) _mapped to_: STRING
    >                   EDI_ETRACT (Element)
    >                      isOutput (Attribute) _mapped to_: true
    >                     type (Attribute) _mapped to_: CURSOR

    > and try ...actually i dont remeber the exact strucuture..but i tolo faced the same pain of this
    >
    > HTH
    > Rajesh
    Hi Rajesh
    Changing the DT per your suggestion result in the following error:
    <SAP:AdditionalText>com.sap.engine.interfaces.messaging.api.exception.MessagingException: Error processing request in sax parser:
    No 'action' attribute found in XML document
    (attribute "action" missing or wrong XML structure)</SAP:AdditionalText>
    Omitting the PROC_NAME element from the DT is not correct.
    Also, I would also like to clarify that the variables of the DT I am using are:
    EDI_EXTRACT_ID is defined as string
    EDI_EXTRACT is defined as string
    Because the variable p_res is mapped to nothing in the request payload it does not show.
    I read in one of the posts that this is correct and the variable is used due to the fact the isOutput attribute is true.
    Regards,
    Effi.
    Edited by: Effi Olivkovitch on Dec 6, 2009 9:11 AM
    Edited by: Effi Olivkovitch on Dec 6, 2009 9:18 AM

  • Converting MS Sql server stored proc to Oracle stored procedure

    I need to convert this MS SQL Server 200 stored procedure to Oracle stored procedure. Any help great appreciated.
    Thank you,
    set nocount on
    declare @sp varchar(100)
    set @sp = '<< stored procedure name goes here >>'
    declare @oid int
    select @oid = o.id from sysobjects o where o.name = @sp
    declare @last int
    -- function signature
    select @last = max(c.colid)
    from dbo.syscolumns c
    where c.id = @oid
    select case c.colid
    when 1 then '[ SqlCommandMethod(CommandType.StoredProcedure) ]'
    + char(13) +
    'public static SqlCommand ' + @sp + '(' + char(13) +
    ' [ NonCommandParameter ] SqlConnection
    ' connection '
    + char(13) +
    else ''
    end
    + ' ' +
    case t.name
    when 'char' then
    '[ SqlParameter(' + convert(nvarchar(10), c.length) + ')  '
    when 'varchar' then
    '[ SqlParameter(' + convert(nvarchar(10), c.length) + ') ] '
    when 'nchar' then
    '[ SqlParameter(' + convert(nvarchar(10), c.length / 2) + ') ] '
    when 'nvarchar' then
    '[ SqlParameter(' + convert(nvarchar(10), c.length / 2) + ') ] '
    else ''
    end
    +
    case t.name
    when 'char' then 'string'
    when 'nchar' then 'string'
    when 'varchar' then 'string'
    when 'nvarchar' then 'string'
    when 'bit' then 'bool'
    when 'datetime' then 'DateTime'
    when 'float' then 'double'
    when 'real' then 'float'
    when 'int' then 'int'
    else 'object /* ' + t.name + ' */'
    end
    + ' ' + lower(substring(c.name, 2, 1)) + substring(c.name, 3, 100)
    +
    case c.colid
    when @last then ')' + char(13) + '{'
    else ','
    end
    from dbo.syscolumns c
    left outer join dbo.systypes t on c.xusertype = t.xusertype
    where c.id = @oid
    order by c.colid
    -- call to generator
    select case c.colid
    when 1 then
    ' return SqlCommandGenerator.GenerateCommand(connection,' +
    char(13)
    else ''
    end
    + ' ' + lower(substring(c.name, 2, 1)) + substring(c.name,
    3, 100)
    +
    case c.colid
    when @last then ');' + char(13) + '}'
    else ','
    end
    from dbo.syscolumns c
    where c.id = @oid
    order by c.colid

    It would have helped if you had posted your code.
    To create tables in procedures, you can use EXECUTE IMMEDIATE. For example, if within a procedure, you want to:
    CREATE TABLE table_name
    (column1 NUMBER,
    column2 VARCHAR2 (30),
    column3 DATE);
    Then, from within a procedure you can:
    CREATE OR REPLACE PROCEDURE procedure_name
    AS
    BEGIN
    EXECUTE IMMEDIATE 'CREATE TABLE table_name
    (column1 NUMBER,
    column2 VARCHAR2 (30),
    column3 DATE)';
    END procedure_name;
    EXEC procedure_name
    For the procedure to count the number of business days between two input dates, see the following link:
    http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:91212348059

  • Calling unix shell script from oracle stored procedure.. urgent!!!!!!!!!!!!

    Hi,
    i havea requirement where in i should be able to call my shell script through oracle stored procedure.i tried the following way..but iam unable to get the result.please find the details below.
    new.sh - my shell script - lctfile (LCTFILE) is the input pa
    v_config_file=`find $FND_TOP -name LCTFILE
    FNDLOAD apps/s0ccer@$dxbs1 0 Y DOWNLOAD $v_config_file /home/bir4163/RPT33/bin/menu.ldt MENU MENU_NAME='AR_NAVIGATE_GUI'
    if [ $? != 0 ];then
    echo "$DATE $0 FNDLOAD DOWNLOAD Failed!" | tee -a $LOG_FILE
    else
    echo "SUCCESS" | tee -a $LOG_FILE
    fi
    CREATE OR REPLACE PROCEDURE test_dbms_scheduler
    AS
    v_text VARCHAR2 (255) := 'AR_NAVIGATE_GUI';
    BEGIN
    DBMS_OUTPUT.put_line ('I am in Procedure');
    DBMS_SCHEDULER.create_job (
    job_name => 'test_dbms_scheduler',
    job_action => '/home/bir4163/RPT33/bin/new.sh',
    number_of_arguments => 1,
    job_type => 'executable',
    start_date => SYSDATE,
    repeat_interval => 'FREQ=SECONDLY; INTERVAL=1',
    enabled => FALSE,
    auto_drop => FALSE,
    comments => 'run shell script'
    DBMS_SCHEDULER.set_job_argument_value (job_name => 'test_dbms_scheduler',
    argument_position => 1,
    argument_value => v_text);
    DBMS_SCHEDULER.enable ('test_dbms_scheduler');
    DBMS_OUTPUT.put_line ('I am back in Procedure');
    EXCEPTION
    WHEN OTHERS
    THEN
    DBMS_OUTPUT.put_line (SQLCODE || SQLERRM);
    END;
    But iam unable to test it as i do not have permissions to access dbms_scheduler.can anybody tell me how to solve this using DBMS_PIPE with a sample code.
    please do help its very urgent
    thanks
    ramya

    Hi,
    Register your Shell Script as a concurrent program, Executable execution method "Host", then use fnd_request.submit_request to submit the program.
    Regards,
    Andries

  • Calling a Oracle stored procedure in orchestrator

    I am trying to execute a stored procedure using the query database IP in orchestrator.  I can select data from the oracle db so i know the prereqs are setup correctly but it fails on executing the stored procedure.
    The syntaxe is execute SPNAME('PARAM!','PARAM2')
    The error is 
    Failed, Oracle failure Database error has occurred. ORA-00900: invalid SQL statement
    Oracle query failure, please verify your query syntax is correct.  Verify correct table names and column names etc...
    The SP works fine in sql developer so im pretty sure the syntax is correct unless the Query Database IP needs a different syntax to work.  

    simple as that.  i actually tried something similar since that is how SCOM executes SP but left the execute command in there so it failed and i moved on.  thanks for the reply.  
    Just for reference i went the powershell route and that worked as well but much more complicated then your solution.  for anyone that wants to know the script is 
    $asm = [System.Reflection.Assembly]::LoadWithPartialName("System.Data.OracleClient") 
    $connectionString = "Data Source=TNSNAME;uid=USERID;pwd=PASSWORD";
    $inputString1 = "PARAMETER INPUT 1";
    $inputString2 = "PARAMETER INPUT 2"
    $oracleConnection = new-object System.Data.OracleClient.OracleConnection($connectionString);
    $cmd = new-object System.Data.OracleClient.OracleCommand;
    $cmd.Connection = $oracleConnection;
    $cmd.CommandText = "SP NAME";
    $cmd.CommandType = [System.Data.CommandType]::StoredProcedure;
    $cmd.Parameters.Add("NAME OF EXPECTED PARAMETER 1", [System.Data.OracleClient.OracleType]::NUMBER) | out-null;
    $cmd.Parameters["NAME OF EXPECTED PARAMETER 1"].Direction = [System.Data.ParameterDirection]::Input;
    $cmd.Parameters["NAME OF EXPECTED PARAMETER 1"].Value = $inputString1;
    $cmd.Parameters.Add("NAME OF EXPECTED PARAMETER 2", [System.Data.OracleClient.OracleType]::VARCHAR2) | out-null;
    $cmd.Parameters["NAME OF EXPECTED PARAMETER 2"].Direction = [System.Data.ParameterDirection]::Input;
    $cmd.Parameters["NAME OF EXPECTED PARAMETER 2"].Value = $inputString2;
    $oracleConnection.Open();
    $cmd.ExecuteNonQuery() | out-null;
    $oracleConnection.Close();
    got help from http://dovetailsoftware.com/clarify/gsherman/2012/05/15/calling-oracle-stored-procedures-using-powershell/

  • Oracle Stored Procedure with out parameter

    Good morning,
    Is it possible to use an Oracle stored procedure with out parameters in MII ?
    If yes, what is the manipulation to see the values of parameters Out?
    Thank you

    Michael,
    This is the  MII query template  :
    DECLARE
    STRCOMPTERENDU NVARCHAR2(200);
    BEGIN
    STRCOMPTERENDU := NULL;
    XMII.SP_VALIDATEPROCESSORDERSLIST2 ( STRCOMPTERENDU => [Param.1]  );
    COMMIT;
    END;
    and the stocked procedure code
    CREATE OR REPLACE PROCEDURE XMII.SP_ValidateProcessOrdersList2(strCompteRendu OUT nVarchar2) IS
    tmpVar NUMBER;
    debugmode INT;
    strClauseSql varchar(2048);
    strListPOactif varchar(1024);
    dtmTimeStamp DATE;
       NAME:       SP_ValidateProcessOrdersList
       PURPOSE:   
       REVISIONS:
       Ver        Date        Author           Description
       1.0        18/06/2008          1. Created this procedure.
       NOTES:
       Automatically available Auto Replace Keywords:
          Object Name:     SP_ValidateProcessOrdersList
          Sysdate:         18/06/2008
          Date and Time:   18/06/2008, 18:45:32, and 18/06/2008 18:45:32
          Username:         (set in TOAD Options, Procedure Editor)
          Table Name:       (set in the "New PL/SQL Object" dialog)
    BEGIN
       tmpVar := 0;
       debugmode := 0;
       -- lecture date systeme pour time stamp
       select sysdate  into dtmTimeStamp from dual;
       if debugmode = 1 then
        DBMS_OUTPUT.put_line('SP_ValidateProcessOrdersList');
       end if;
       -- insertion du bloc dans le log
       insert into LOG_ORDER
        (DATE_ORDER,BLOCK_ORDER,ID_LOG_ORDER)
       values
       (dtmTimeStamp,'SP_ValidateProcessOrdersList',ID_LOG_ORDER.nextval);
       Commit;
        if debugmode = 1 then
        DBMS_OUTPUT.put_line('insertion LOG OK');
       end if;
    strCompteRendu := '0123456-896;0123456-897';
    commit; 
       EXCEPTION
         WHEN NO_DATA_FOUND THEN
           NULL;
         WHEN OTHERS THEN
         ROLLBACK;
         -- insertion du bloc dans le log
       insert into LOG_ORDER
        (DATE_ORDER,BLOCK_ORDER,ID_LOG_ORDER)
       values
       (dtmTimeStamp,' ',ID_LOG_ORDER.nextval);
       COMMIT;
           -- Consider logging the error and then re-raise
           RAISE;
    END SP_ValidateProcessOrdersList2;
    Thanks for your help
    Alexandre

  • How to call oracle stored procedure with OUT parameter?

    I create oracle stored procedure in eclipse oepe
    PROCEDURE SP_SELECT_ORA (
    ID_INPUT IN VARCHAR2,
    ID_OUTPUT OUT VARCHAR2,
    PASSWD_OUTPUT OUT VARCHAR2,
    NAME_OUTPUT OUT VARCHAR2) IS
    BEGIN
    SELECT EMP_ID, EMP_Passwd, EMP_Name
    INTO ID_OUTPUT, PASSWD_OUTPUT, NAME_OUTPUT
    FROM family
    WHERE EMP_ID = ID_INPUT;
    END;
    and I try to call the sp in jpa like below,
    @NamedNativeQueries({
         @NamedNativeQuery(name = "callSelectSP", query = "call SP_SELECT_ORA(?,?,?,?)", resultClass = Members.class)
    @Entity
    @Table(name="family")
    public class Members implements Serializable {
         @Id
         @Column(name = "EMP_ID")
         private String ID;
         @Column(name = "EMP_Passwd")
         private String Passwd;
         @Column(name = "EMP_Name")
         private String Name;
    ==============
    @PersistenceContext(unitName="MyFamily")
         EntityManager em;
    query = em.createNamedQuery("callSelectSP");
         query.setParameter(1, ID);
         String id_output = null;
         String passwd_output = null;
         String name_output = null;
         query.setParameter(2,id_output);
         query.setParameter(3,passwd_output);
         query.setParameter(4,name_output);
         query.executeUpdate();
         member = (Members)query.getSingleResult();
    But this query throws exception,
    19:55:35,500 WARN [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (http--127.0.0.1-8080-1) SQL Error: 1465, SQLState: 72000
    19:55:35,500 ERROR [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (http--127.0.0.1-8080-1) ORA-01465: invalid hex number
    I don't know how. Pls, give me your advice. Thanks in advnace.
    Best regards

    Thank you for your reply, Chris!
    I tried this one.
    @NamedNativeQueries({
    @NamedNativeQuery(name = "callSelectSP", query = "exec SP_SELECT_ORA( ?, :id_output, :passwd_output, :name_output) " , resultClass = Members.class)
    @Entity
    @Table(name="family")
    public class Members implements Serializable
    ===================
    query = em.createNamedQuery("callSelectSP");
    query.setParameter(1, ID);
    String id_output = null;
    String passwd_output = null;
    String name_output = null;
    query.setParameter("id_output", id_output);
    query.setParameter("passwd_output", passwd_output);
    query.setParameter("name_output",name_output);
    query.executeUpdate();
    On Console hibernate shew the sql and ora # like below,
    19:59:25,160 INFO [stdout] (http--127.0.0.1-8080-1) Hibernate: exec SP_SELECT_ORA( ?, ?, ?, ?)
    19:59:25,192 WARN [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (http--127.0.0.1-8080-1) SQL Error: 900, SQLState: 42000
    19:59:25,192 ERROR [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (http--127.0.0.1-8080-1) ORA-00900: Invalid SQL statement
    Pls, inform me your advice. Thanks in advance.
    Best regards.

Maybe you are looking for

  • Synch BPEL Process calling PeopleSoft CI Web Service

    Hello....I am trying to create a simple BPEL Process which invokes a PeopleSoft Component Interface Web Service that I created in PeopleSoft 8.9 and when I execute the BPEL Process, the following binding fault is thrown: xmlns:SOAP-ENV="http://schema

  • Item Changed Status on a block

    Hi: I want to run when-validate only if an item status has changed to 'Modify'. How can I get the status. Is there any other better way to do this. Any Suggestions? Thanks in Advance Alok

  • Hyperion EPM 11 upgrade issue

    Hi, We are upgrading from Hyperion Planning 9.3.1 to EPM 11. We use Oracle 10 G R2 database as the backend. Will a new database need to be created for EPM 11? Also can the metadata be migrated from current database to new database. Will the database

  • IPhone 2.1 Software Update for iPod 9.99 ?????

    IPhone 2.1 Software Update for iPod 9.99 ????? Why is this payware - Do we have to pay for this on the IPhone as well??? if we do this phone will be tossed into the trash! Message was edited by: Mac Pro 8core - x86

  • Updating 3.6.13 from 3.6.12 for Linux never connects

    Running Slackware 13.0 on a KT4V-L AMD 2200+ @ 18GHz. Responding to request to update to firefox 3.6.13 using Linux version of 3.6.12. Spinner continues to spin forever. Have tried at least 5 times now with no connection or response. Verified connect