How to call Oracle Procedure into ODI

Hi,
I'm using ODI 10g.
Before executing the interface in a package i wanted to place my Procedure.
I created following procedure in d/b (target)
CREATE OR REPLACE PROCEDURE TEST_MY_NEW_PROCE
AS
BEGIN
DELETE FROM EMPLOYEE_TABLE
WHERE EMPLOPYEE_ID LIKE 'P%';
COMMIT;
END;
The Procedure is working fine in target database.
Now, before executing my interface i would like to run this procedure in my package. So, can some one please help me how to call this oracle procedure (Created in Target schema) into ODI and run this.
thank you.

Hi GRK,
You can create an ODI procedure, add a single step, choose Oracle as Technology and your target schema.
Then just call it through a pl/sql block :
BEGIN
TEST_MY_NEW_PROCE;
END;Then drag this ODI procedure in your package.
Regards,
JeromeFr

Similar Messages

  • How to compile Oracle procedure throught ODI procedure

    Hi
    Can any one help me how to compile oracle procedure through ODI11g
    I am awar of that, how to call oracle procedure in ODI and execute it.
    Please help me
    Regards,
    Phanikanth

    You want to know how to compile, or how to call, or both ?
    I don't know for compilation, but call a procedure is simple.
    You juste have to create an ODI Procedure and write the SQL statement like you do in a query editor.

  • How to call oracle procedure in JPA?

    Hi,
    I am new to JPA.
    Can one help with a piece of code on how to call a procedure in JPA?
    Thanks

    Use the search, I answered this last week.

  • How to bring oracle function into ODI

    Hi,
    I have a oracle function which I have to bring into ODI, could you please let me know how to do that?
    Thanks!
    Regards,
    Supreeth

    Hi Supreeth ,
    Before invoking a stored procedure from Oracle Data Integrator (ODI), run it outside ODI (i.e. SqlPlus), on the database, using the same database user as entered in the ODI Topology for this connection and make sure it is working properly .
    Then, when invoking the stored procedure from Oracle Data Integrator (ODI):
    1. Create an ODI Specific Procedure.
    2. Insert a step and, in the "Technology" drill down box, choose the appropriate RDBMS. Leave the context to "<Execution Context>".
    3. The precise syntax for calling RDBMS stored procedures in ODI may vary from one Technology to another one.
    For Oracle technologies, the syntax is as follows:
    BEGIN
    <%=odiRef.getObjectName (pMode, My_Procedure, pLogicalSchemaName, pContextName, pLocation)%> (MY_PARAM1, MY_PARAM2...);
    END;
    where
    * My_Procedure - is the stored procedure name
    * MY_PARAM1, MY_PARAM2... - are stored procedure parameter values
    * pMode, pLogicalSchemaName, pContextName, pLocation - are parameters of the getObjectName Substitution Method.
    At my Oracle instance I have a function called MY_FUNCTION
    So my syntax would be
    <%=odiRef.getObjectName ("L","MY_FUNCTION","D")%>
    Thanks,
    Sutirtha

  • How to call oracle procedure from vb

    i created a procedure in oracle8.1.7 to return on value,look the following script:
    Procedure P_COUNT (r out number)
    IS
    BEGIN
    select count(*) into r from demo;
    END;
    but i can get the value from VB,i display some errors:
    ORA-06502 PL/SQL: numeric or value errorstring
    ORA-06512 at stringline string
    what can i do now?
    null

    Hei Zhang,
    Thank You. You can return Cursor in many ways. You can write either a function to return cursor (return type is %ROWTYPE) or a package. Writing a Package seems laborious but I like it as it has lot of flexibility.
    I will give you the example for the second type:
    -- 1) Create a Package first:
    CREATE OR REPLACE PACKAGE pk_MyPackage AS Type RT1 IS RECORD (
    sp_ename emp.ename%TYPE,
    sp_job emp.job%TYPE,
    sp_mgr emp.mgr%TYPE
    TYPE RCT1 IS REF CURSOR RETURN RT1;
    END;
    sho err
    -- 2) Create a Procedure:
    CREATE OR REPLACE PROCEDURE sp_MyProcedure (
    in_empno emp.empno%TYPE,
    RC1 IN OUT pk_MyPackage.RCT1
    ) AS
    BEGIN
    OPEN RC1 FOR
    SELECT ename,
    job,
    mgr
    FROM emp
    WHERE empno = in_empno;
    RETURN;
    END;
    sho err
    --Testing
    SQL> var cr refcursor
    SQL> exec sp_MyProcedure (7934, :cr)
    PL/SQL procedure successfully completed.
    SQL> print cr
    ENAME JOB MGR
    MILLER CLERK 7782
    Hope this is clear and helps you to complete your task.
    Cheers!
    r@m@

  • How to call oracle stored procedure

    how to call oracle stored procedure using
    jdevloper.can any one help?
    thanks
    pullareddy

    Connection conn =
    DriverManager.getConnection("your connect string");
    CallableStatement stm=conn.prepareCall( "{?=call getDeptName(?)}");
    stm.registerOutParameter(1,OracleTypes.VARCHAR);
    int deptno=10;
    stm.setInt(2,deptno);
    stm.execute();
    String dname=stm.getString(1);
    stm.close();
    conn.close();
    getDeptName is a function:
    FUNCTION
    getDeptName(id IN NUMBER) RETURN VARCHAR2...

  • How to call custom API in ODI

    Hi All,how to call custom API in ODI and how can multiple people run the scenario at same time. I explained my process below
    1. Through ODI console pass parameter (file name) to scenario and read the file form configured location
    2. Insert the data from flat file to custom table
    3. Call custom API
    4. Generating a report in ODI in same location where we read the file from. Creating sample report just reading from custom table
    5. The above design should be such that multiple people can run the scenario at same time.
    can any one help me on step 3 and step 5 how to go forward..
    Thanks in Advance.
    Edited by: 981371 on Mar 4, 2013 3:19 AM

    You can invoke java api in the procedure or KM tasks. You can select Jython technology type and can call the custom java API.
    You may find relevant info at
    http://docs.oracle.com/cd/E23943_01/integrate.1111/e12643/procedures.htm#CHDIDDFE
    http://docs.oracle.com/cd/E23943_01/integrate.1111/e12645/intro.htm#sthref5
    http://docs.oracle.com/cd/E23943_01/integrate.1111/e12645/api_intro.htm#CEGFCFHC
    You can directly put DB functions in the your mapping expressions.

  • How to call one procedure from another procedure

    Hi all,
    Could anyone give me clue how to call a procedure contains out parameters
    from another procedure.
    I had following procedures.
    1)
    create or replace procedure INS_PUR_ORDER
    p_poamt in number,
    p_podate in date,
    p_poid out number
    is
    begin
    select pkseq.nextval into p_poid from dual;
    insert into pur_order(poamt,podate,poid)
    values (p_poamt,p_podate,p_poid);
    end;
    2)
    create or replace procedure INS_PUR_ORDER_DETAIL
    p_pounits in number,
    p_poddate in date,
    p_poid in number)
    is
    begin
    Insert into pur_order_detail(podid,pounits,poddate,poid)
    values(pdseq.nextval,p_pounits,p_poddate,p_poid);
    end;
    I need to write a 3rd procedure which calls above two procedures.
    like
    call first procedure ,basing on the return value
    i.e if p_poid != 0 then
    we need to call second procedure
    in the loop.
    thanks in advance.
    rampa.

    Not sure what are you doing, you can not assign cursor to another cursor, may be you are looking for this?
    SQL> create or replace procedure proc1 ( result out sys_refcursor)
      2  is
      3  
      4  begin
      5     open result for
      6       select 'HELLO WORLD' from dual ;
      7  end proc1 ;
      8  /
    Procedure created.
    Elapsed: 00:00:00.01
    SQL> create or replace procedure proc2
      2  is
      3     l_cursor sys_refcursor ;
      4  begin
      5     l_cursor := proc1 ;
      6   
      7  
      8     open l_cursor;
      9     fetch l_cursor into l_text;
    10     dbms_output.put_line(l_text);
    11     close l_cursor;
    12  
    13  
    14  end proc2 ;
    15  /
    Warning: Procedure created with compilation errors.
    Elapsed: 00:00:00.01
    SQL> show error;
    Errors for PROCEDURE PROC2:
    LINE/COL ERROR
    5/4      PL/SQL: Statement ignored
    5/16     PLS-00306: wrong number or types of arguments
             in call to 'PROC1'
    6/4      PLS-00201: identifier 'L_TEXT' must be
             declared
    6/4      PL/SQL: Statement ignored
    8/4      PLS-00382: expression is of wrong type
    8/4      PL/SQL: SQL Statement ignored
    9/4      PL/SQL: SQL Statement ignored
    9/24     PLS-00201: identifier 'L_TEXT' must be
             declared
    10/4     PL/SQL: Statement ignored
    10/25    PLS-00201: identifier 'L_TEXT' must be
             declared
    ---- this is the correct waySQL>ed
      1  create or replace procedure proc2
      2  is
      3     l_cursor sys_refcursor ;
      4     l_text varchar2(100);
      5  begin
    ---- procedure call
      6     proc1(l_cursor); 
    7    -- open l_cursor;
      8     fetch l_cursor into l_text;
      9     dbms_output.put_line(l_text);
    10     close l_cursor;
    11* end proc2 ;
    SQL> /
    Procedure created.
    Elapsed: 00:00:00.01
    SQL> set serveroutput on
    SQL> execute proc2;
    HELLO WORLD
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:00.00
    SQL>

  • How to call this procedure in my report to print my procedure output

    Hi,
    i have a table named letter,it contains 2 columns named as letter_id and letter_content.
    select * from letter;
    letter_id letter_content
    103 Dear MFR
    103 This is in regards to the attached DM List
    103 Please Credit us after reviewing it.
    103 Thanks
    103 Regards
    103 xxxx
    108 Dear customer
    108 This is to inform that ur DM List is as follows
    108 Credit us according to the Dm after reviewing it.
    108 Thanks
    108 Regards
    108 xxxx
    now my requirement is,i need send a parameter as letter_id to a procedure or function in pl/sql in oracle,the output should be as follows:
    if we will pass parameter(letter_id) = 103 then it displays as follows:
    Dear MFR
    This is in regards to the attached DM List.Please Credit us after reviewing it.
    Thanks
    Regards,
    XXXXX.
    if we will pass parameter(letter_id) = 108 then it should displays as follows:
    Dear customer,
    This is to inform that ur DM List is as follows. Credit us according to the Dm after reviewing it.
    Thanks
    Regards,
    XXXXX.
    the procedure for my requirement is like below.now my problem is how to call this procedure in my report.so that if i will send a parameter as letter_id then it should get my report stated above.
    CREATE OR REPLACE PROCEDURE letter_text ( p_letter_id letter.letter_id%TYPE , p_letter_contents_out OUT SYS_REFCURSOR )
    IS
    BEGIN
    OPEN p_letter_contents_out
    FOR
    SELECT letter_content
    FROM letter
    WHERE letter_id = p_letter_id
    ORDER BY line_seq;
    END letter_text;
    which you might call with something like
    SQL> var results refcursor
    SQL> exec letter_text(103, :results)
    PL/SQL procedure successfully completed.
    SQL> print :results;
    CONTENT
    Dear MFR
    this is in regards to the attached DM List
    Please credit us after reviewing it
    thanks
    Regards
    EXP
    6 rows selected.
    so, the same out put i need to get it in a report.
    Thanks

    Thanks for ur suggestions.
    i have 2 select statements.1st query is the main query for the report.so i used it at the time of report created with datablock.
    now my 2nd query is
    select letter_content
    from ( select content_seq,
         content || case content_seq
    when 2 then
    ' ' || lead(content) over (partition by letter_id order by content_seq)
    end as letter_content
    from exp_letter_contents
         where letter_id = 103)
    where content_seq <> 3;
    i had taken 2parameters 1 for the main query and 2nd is for the above query(parameter is letter_id).
    now i have to write the above select statement in the report.
    so i had taken a field object in the report and then i had written this code in before report trigger.
    function letter_contentFormatTrigger return boolean is
    begin
    select letter_content
    from ( select content_seq,
                        content ||
                        case content_seq when 2 then
                             ' ' || lead(content) over (partition by letter_id order by content_seq)
                        end as letter_content
              from exp_letter_contents
              where letter_id = 103)
    where content_seq <> 3;
    return (letter_content);
    end;
    when i tried to compile it.i got an error as follows :
    error 103 at line6,column 5
    encountered the symbol "CASE" when expecting one of the following:
    (- + mod null <an identifier>
    <a double-quoted delimited-identifier><a bind variable> avg...etc
    so,where can i write this select statement.
    i am using oracle reports6i
    Message was edited by:
    user579585

  • How to call plsql procedure or function and getting back the string?

    Hi Everyone,
    i am using Jdev 11.1.1.5.0.
    i have a requirement to call plsql procedure or function from my backing bean java file and get back the returned value from the procedure or function.
    what piece of simple code i need to write in my backing bean?
    please suggest.
    Thanks.

    As always you write the method to call he pl/sql in the application module, expose this method to the client (so you see it in the datacontroll) then create a operation binding to the method and call this operation from the bean. The result you get by operation.getResult();
    You should never call pl/sql from the bean directly!
    The doc shows how to call the procedure from an application module: http://docs.oracle.com/cd/E21764_01/web.1111/b31974/bcadvgen.htm#sm0297
    Timo

  • How to call stored procedure in ASP pages

    After I migragate MS SQL server database to Oracle 8i database, all the call to stored procedure in ASP has problems. I have been had a problem to find some document about how to call oracle stroed procedure from SQL*plus or using ADO. If anybody can help me to find any resource about it. or better give me some examples, that will be very helpful.
    Thanks!
    null

    If you have account on Metalink.
    Please go there and do a search on ASP.
    There you can find, how to call SP from
    ASP.
    If you have problem finding this let
    me know.
    I will try to find it

  • 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

  • How to call a procedure

    Hi,
    I know this a silly question..but i am not getting how to do.
    I have stored procedure with multiple OUT and IN parameters.But i want to use only one parameter to call the procedure, for example:
    create or replace
    PROCEDURE Get_NN_Distance ( nbrid OUT NUMBER
    , nbrTDistOut OUT NUMBER
    , nbrRHouse OUT NUMBER
    , nbrResDist OUT NUMBER
    , nbrBHouse OUT NUMBER
    , nbrBdist OUT NUMBER
    , nbrSIDIn IN NUMBER
    , nbrRefLatIn IN NUMBER
    , nbrRefLonIn IN NUMBER
    , nbrRadius IN NUMBER := 1000 -- Default to 200 ft.
    but i want to use only one parameter nbrSIDIn only.
    this parameter represents SITEID, If we give SITEID we can get LAT,Long for that siteid by using another table: i want to put nbrradius as default:
    how to call the procedure by using only SITEID:
    Can anyone help me in this Plz
    Thanks

    ramakrish wrote:
    I have stored procedure with multiple OUT and IN parameters.But i want to use only one parameter to call the procedure, The OUT parameters forces you to supply variables to receive these output values from the procedure.
    So instead, create a new procedure that serves as a wrapper procedure. Where this provides a single parameter only and makes the call on your behalf using multiple parameters. E.g.
    create or replace procedure Do_NN_Distance( sidIn number ) is
    .. local variables...
    begin
      Get_NN_Distance( 
        nbrSIDIn => sidIn,
        .. other params using local variables...
    end;BTW, I suggest that you reconsider using prefixes like "+nbr+" to indicate data type. Hungarian notation is dead. Especially in a strongly typed language.. especially in a an explicit variable type definition language.
    +"Encoding the type of a function into the name (so-called Hungarian notation) is brain damaged—the compiler knows the types anyway and can check those, and it only confuses the programmer."+
    Linus Torvalds

  • How to call stored procedure in hibernate

    hi ,
    can any one help me how to call stored procedure in hibernate.Given code in hbm.xml
    and also plz tell me what is the use of <return-property/>in given hbm.xml file.
    <sql-query name="selectEmployees_SP" callable="true">
         <return alias="emp" class="com.centris.Employee">
    <return-property name="eno" column="eno"/>
    <return-property name="ename" column="ename"/>
    <return-property name="address" column="address"/>
    <return-property name="salary" column="salary"/>
    { ? = call p_retrieve_employees() }
    </return>
    </sql-query>

    Hi,
    Your question isn't related to Java Programming and should be asked in a [Hibernate forum|http://forum.hibernate.org/]
    Kaj

  • How to load oracle data into SQL SERVER 2000?

    how to load oracle data into SQL SERVER 2000.
    IS THERE ANY UTILITY AVAILABLE?

    Not a concern for an Oracle forum.
    Als no need for SHOUTING.
    Conventional solutions are
    - dump the data to a csv file and load it in Mickeysoft SQL server
    - use Oracle Heterogeneous services
    - use Mickeysoft DTS
    Whatever you prefer.
    Sybrand Bakker
    Senior Oracle DBA

Maybe you are looking for

  • Pages '09 integrating straight and curly quotes within one file.

    I'm doing an edit in Pages and the document has a mix of straight and curly quotes. I can't seem to find a way to get them all the same. Find-and-replace turns some of the quotes backwards (as in 'em for them) Nothing in the archives addresses this.

  • Getting "There are no speakers connected to the AirPlay device " device-name "

    For the past several years, I have had a stereo receiver hooked up to and airport express to stream music wirelessly from my iMac to stereo speakers.  All of a sudden, I started getting the message "There are no speakers connected to the AirPlay devi

  • Bloated "OPEN WITH" Menu -- Fix?

    Slowly my "OPEN WITH" menu as turned into a overfilled disaster as *old versions* of apps, and sometimes even apps that are irrelevant to the file type. Screenshot http://img403.imageshack.us/img403/48/picture3pn2.gif How do I remove programs from th

  • Help with windowListener please

    Can someone please tell me what i'm doing wrong here? The program is pretty simple. It only writes input to a file. The problem is that the WindowListener is not working like I expected. Thanks for any help. I expected the windowListener part of the

  • Is It possible to connect to Itune by bluetooth?

    Hi, I'm tryiing to connect by Bluetooth my Ipad to my PC Windows7, but only can have a connection for audio, is it possible to have data connection? Regards.