Calling OWB mappings within apply handlers

Hi,
I have configured streams to capture changes in my source tables. And in my apply process, I have set apply handlers which try to call OWB mappings for populating data into destination tables. But I am getting an error while doing so -
ORA-20213: Unable to create standalone job record - there may be no task defined for this map
How can i solve this problem?
Thanks
Giri

Hi Giri,
First of all some good news. We are adding exactly this functionality to the new release of OWB (soon to be in beta).
Now for solving this, there is another thread on the forum about this. I have not tried this myself, but if you are calling this from pl/sql you may want to use the example on OTN (run_my_owb_stuff.sql) which you can find here: http://www.oracle.com/technology/sample_code/products/warehouse/index.html
That will create a procedure that you can call from the apply handler.
Hope this points you in the right direction,
Jean-Pierre

Similar Messages

  • How to call owb mappings using Control M

    Hi Guru's,
    Please help me with the script/steps  for calling OWB mappings in Control M.
    Thanks in advance!

    Hi Kishan,
    Use sqlplus_exec_template.sql in <OWB_HOME>\owb\rtp\sql\.
    Alternatively you can use similar code provided by OWB-team: http://www.oracle.com/technology/sample_code/products/warehouse/files/run_my_owb_stuff.sql
    Good luck, Patrick

  • How to call OWB Mappings?

    Hi,
    I need to call the OWB mappings from an Oracle stored procedure.How can I implement this?
    Regards
    Kishan

    Hi Kishan,
    Use sqlplus_exec_template.sql in <OWB_HOME>\owb\rtp\sql\.
    Alternatively you can use similar code provided by OWB-team: http://www.oracle.com/technology/sample_code/products/warehouse/files/run_my_owb_stuff.sql
    Good luck, Patrick

  • Can we call a function within a function??????Urgent

    Dear All,
    Like we can call a procedure from another procedure , in the same way can we call a function within a function. Please reply it's urgent.
    Regards

    > Please reply it's urgent.
    My usual soapbox response.
    Saying your posting is urgent is rude and arrogant. Why? Because you are saying that other people who have posted problems here, have less important problems than yours. That despite how complex and critical their problem may be, yours take priority.
    You're also demaning attention and a quick answer from people that provide support here - in their free time... and not getting paid a single cent for their efforts.
    So just how can you demand any urgency to your posting from them?
    Remember that this is a public forum. You cannot demand anything here. This is not Oracle Support. There are no SLA's here. Basic nettiquette applies.

  • Any tips for debugging apply handlers? How to use SYS.AnyData

    Well, I'm setting up my first stream.
    I've set up a simple stream just to understand the concepts, but now I need to start the real work.
    I've written an apply handler that takes the LCR, turns pulls values from the sys.AnyData, and uses them in another statement. I have excerpts from it below-- I've not used a SYS.AnyData before, and I'm not sure if I've set the conversion up correctly:
    CREATE OR REPLACE PROCEDURE reg_data_handler(in_any IN SYS.AnyData)
    RETURN SYS.AnyData
    IS
         lcr     SYS.LCR$_ROW_RECORD;
         lcr_anydata SYS.AnyData;
         -- Should I declare like this
    -- or should I make it a Number for
    -- the SYS.AnyData conversion?
         -- TYPE is really a NUMBER(11)
    samp_time nh_rlp_stats.sample_time%TYPE;
    BEGIN
    -- Access the LCR
    rc := in_any.GETOBJECT(lcr);
    -- Get the object command type
    command := lcr.GET_COMMAND_TYPE();
    IF command = 'INSERT' THEN
    -- get the needed data
    lcr_anydata := lcr.GET_VALUE('new','SAMPLE_TIME');
    rc := lcr_anydata.get_number(samp_time);
    Does anyone have any tips on how to do the debugging as painlessly as possible? I've tested as much of the individual units as possible, but in order to test the code that pulls from the LCR, it seems like I'll need to hook it into the steam and hope for useful dbms_output statements. Other ideas?
    Thanks very much.
    Robin T

    Actually, I have read the supplied list a couple of times over. There is a difference between reading and doing, particularly as documentation can be mis-interpreted or miss key items. I supplied the code snippets in case some one could see that I was mis-reading the info.
    My particular concern is with debugging: are there any tips people have learnt to make the process easier? If I just hook the handler into a stream and test it that way, I suspect that it might take some time to shake the kinks out. However, it occurred to me this morning that maybe I can fake out the LCR by constructing one of my own in a wrapper procedure and calling the handler within that. So, I'll see if that speeds up the process.
    Thanks very much for your reply.

  • Calling owb workflow job created in oem using pl/sql

    is it possible using pl/sql to call owb workflow job which is created thru oem
    can you pl be kind enough to share a sample.
    thanks

    Hi,
    The same question was just answered by another member a couple a days ago want to run owb mappings thru job schedule :
    sqlplus_exec_template runtime_owner location_name PROCESS process_name "," ","
    sqlplus_exec_template is in "D:\oracle\oraWB\owb\rtp\sql"
    Nikolai Rochnik

  • Calling OWB from forms

    hi,
    i need help regarding calling OWB from Oracle Forms. i have a transformation routine written in java, which i'd be calling through forms and then switch to OWB. is there a way i can do that?
    Regards,
    Mehwish

    Is your question how to call out to Java from Forms? You didn't say which version you are using, but from Forms 6i and up you can use the the Java Importer. This let's you create a PL/SQL wrapper around your Java so that you can refer to it from within Forms. At runtime, Forms will call out to Java for you.
    Regards,
    Robin.

  • Wrapping owb mappings

    Hi all
    We have owb mappings which I want to include in as part of a custom software. We would be delivering the solution to the client. Is it required for client to have owb installed can't they use the packages created by the mapping.
    I want to run these mapping at client site so want to wrap them within a custom software as a whole. what is the best approach? how can I use these mappings at the client site how do I use these.
    Pls post your suggestions

    Hi,
    you can wrap the package bodies with http://download.oracle.com/docs/cd/B28359_01/appdev.111/b28370/wrap.htm.
    You need a repository on the server where you want to run the mappings. Normally you need a owb installation too. Otherwise you must create a clone of the rep using a dump.
    Regards,
    Detlef

  • How to reuse standard Activity subcomponents - Appointments, Tasks, Phone Calls and Emails within a custom work center?

    Requirement : We have a requirement to reuse the standard Activity subcomponents Appointments, Tasks, Phone Calls and Emails within a custom work centre. The requirement is to leverage and copy all sub functionalities Appointments, Tasks, Phone Calls and Emails available within the standard activity work center. This feature is available within Accounts, Opportunities, Leads etc. (Refer screenshot: Std_Act_Screen.jpg)
    We are unable to consume/embed the standard Activity (Work center) sub components Appointments, Tasks, Phone Calls and Emails within the custom work center. This is because of backend consistency check violation UI designer error message displayed. (Refer screenshot:Error while consuming standard activities.jpg)
    Ø  Open Question:
    a.      Is there a limitation to consume/embed the standard Activity (Work center) subcomponents Appointments, Tasks, Phone Calls and Emails within a custom work center?  We have noticed that this standard Activity Work center subcomponents Appointments, Tasks, Phone Calls and Emails has been repeatedly reused within the application in Account, Opportunity, Sales lead, Lead, Sales Quote Objects.
    b.      Is there an alternative way in which we can call [Through API etc..] the standard Activity Work center subcomponents Appointments, Tasks, Phone Calls and Emails?
    We need your guidance to overcome the error to enable the reuse of the standard Activity Work center sub-components Appointments, Tasks, Phone Calls and Emails within our custom work center or suggest a suitable workaround on how this can be achieved.
    Regards .. Dheeraj Saini

    Whenever you find out let me know. I wanted to assign a text tone to someone and now in iOS 7 i can't. Or I haven't figured this out yet.

  • How to call methods from within run()

    Seems like this must be a common question, but I cannot for the life of me, find the appropriate topic. So apologies ahead of time if this is a repeat.
    I have code like the following:
    public class MainClass implements Runnable {
    public static void main(String args[]) {
    Thread t = new Thread(new MainClass());
    t.start();
    public void run() {
    if (condition)
    doSomethingIntensive();
    else
    doSomethingElseIntensive();
    System.out.println("I want this to print ONLY AFTER the method call finishes, but I'm printed before either 'Intensive' method call completes.");
    private void doSomethingIntensive() {
    System.out.println("I'm never printed because run() ends before execution gets here.");
    return;
    private void doSomethingElseIntensive() {
    System.out.println("I'm never printed because run() ends before execution gets here.");
    return;
    }Question: how do you call methods from within run() and still have it be sequential execution? It seems that a method call within run() creates a new thread just for the method. BUT, this isn't true, because the Thread.currentThread().getName() names are the same instead run() and the "intensive" methods. So, it's not like I can pause one until the method completes because they're the same thread! (I've tried this.)
    So, moral of the story, is there no breaking down a thread's execution into methods? Does all your thread code have to be within the run() method, even if it's 1000 lines? Seems like this wouldn't be the case, but can't get it to work otherwise.
    Thanks all!!!

    I (think I) understand the basics.. what I'm confused
    about is whether the methods are synced on the class
    type or a class instance?The short answer is; the instance for non-static methods, and the class for static methods, although it would be more accurate to say against the instance of the Class for static methods.
    The locking associated with the "sychronized" keyword is all based around an entity called a "monitor". Whenever a thread wants to enter a synchronized method or block, if it doesn't already "own" the monitor, it will try to take it. If the monitor is owned by another thread, then the current thread will block until the other thread releases the monitor. Once the synchronized block is complete, the monitor is released by the thread that owns it.
    So your question boils down to; where does this monitor come from? Every instance of every Object has a monitor associated with it, and any synchronized method or synchonized block is going to take the monitor associated with the instance. The following:
      synchronized void myMethod() {...is equivalent to:
      void myMethod() {
        synchronized(this) {
      ...Keep in mind, though, that every Class has an instance too. You can call "this.getClass()" to get that instance, or you can get the instance for a specific class, say String, with "String.class". Whenever you declare a static method as synchronized, or put a synchronized block inside a static method, the monitor taken will be the one associated with the instance of the class in which the method was declared. In other words this:
      public class Foo {
        synchronized static void myMethod() {...is equivalent to:
      public class Foo{
        static void myMethod() {
          synchronized(Foo.class) {...The problem here is that the instance of the Foo class is being locked. If we declare a subclass of Foo, and then declare a synchronized static method in the subclass, it will lock on the subclass and not on Foo. This is OK, but you have to be aware of it. If you try to declare a static resource of some sort inside Foo, it's best to make it private instead of protected, because subclasses can't really lock on the parent class (well, at least, not without doing something ugly like "synchronized(Foo.class)", which isn't terribly maintainable).
    Doing something like "synchronized(this.getClass())" is a really bad idea. Each subclass is going to take a different monitor, so you can have as many threads in your synchronized block as you have subclasses, and I can't think of a time I'd want that.
    There's also another, equivalent aproach you can take, if this makes more sense to you:
      static final Object lock = new Object();
      void myMethod() {
        synchronized(lock) {
          // Stuff in here is synchronized against the lock's monitor
      }This will take the monitor of the instance referenced by "lock". Since lock is a static variable, only one thread at a time will be able to get into myMethod(), even if the threads are calling into different instances.

  • OWB mappings to skip rows that are in error and continue processing

    OWB mappings to skip rows that are in error and continue processing.
    1) Enter a record into an error log
    2) Skip rows that are in error
    3) and continue processing
    Type of information could be needed in the error log:
    SY_LOG_ERROR_KEY
    ERROR_TIMESTAMP
    MAP_NAME
    SOURCE_RECORD
    ERROR_CODE
    ERROR_MESSAGE
    ERROR_NOTES
    Example:
    If the source table has five records, in that 3 records has some error.
    When I run the OWB mapping to load the source data to target table, OWB should skip the 3 record and load all the remaining record. This is our requirement.
    Another think I want to store the error record details in a error log table.
    Can u plz tell me whether it is possible in OWB. If not means please give some suggestion to do this.

    Hi,
    thanks for ur help, As is OWB version is 10.2.0 so for set based it is not working. with your idea i create a POST PROCESSING MAPPING. it is now working fine.
    Step 1:
    Create a table MAP_ERROR_LOG.
    Script:
    CREATE TABLE MAP_ERROR_LOG
    ERROR_SEQ NUMBER,
    MAPPING_NAME VARCHAR2(32 BYTE),
    TARGET_TABLE VARCHAR2(35 BYTE),
    TARGET_COLUMN VARCHAR2(35 BYTE),
    TARGET_VALUE VARCHAR2(100 BYTE),
    PRIMARY_TABLE VARCHAR2(100 BYTE),
    ERROR_ROWKEY NUMBER,
    ERROR_CODE VARCHAR2(12 BYTE),
    ERROR_MESSAGE VARCHAR2(2000 BYTE),
    ERROR_TIMESTAMP DATE
    TABLESPACE ODS_D1_AA
    PCTUSED 0
    PCTFREE 10
    INITRANS 1
    MAXTRANS 255
    STORAGE (
    INITIAL 80K
    MINEXTENTS 1
    MAXEXTENTS 2147483645
    PCTINCREASE 0
    BUFFER_POOL DEFAULT
    LOGGING
    NOCOMPRESS
    NOCACHE
    NOPARALLEL
    MONITORING;
    Step 2:
    Create a sequence MAP_ERROR_LOG_SEQ
    CREATE SEQUENCE MAP_ERROR_LOG_SEQ START WITH 1 INCREMENT BY 1
    Step 3:
    Create a procedure PROC_MAP_ERROR_LOG through OWB.
    In this i have used 3 cursor, first cursor is used to check the count of error messages for the corresponding table(WB_RT_ERROR_SOURCES).
    The second cursor is used to get the oracle error and the primary key values.
    The third cursor is used for get the ORACLE DBA errors such as "UNABLE TO EXTEND THE TABLESPACE" for this type errors.
    CREATE OR REPLACE PROCEDURE PROC_MAP_ERROR_LOG(MAP_ID VARCHAR2) IS
    --initialize variables here
    CURSOR C1 IS
    SELECT COUNT(RTA_IID) FROM OWBREPO.WB_RT_ERROR_SOURCES
    WHERE RTA_IID =( SELECT MAX(RTA_IID) FROM OWBREPO.WB_RT_AUDIT WHERE RTA_PRIMARY_TARGET ='"'||MAP_ID||'"');
    V_COUNT NUMBER;
    CURSOR C2 IS
    SELECT A.RTE_ROWKEY ERR_ROWKEY,SUBSTR(A.RTE_SQLERRM,1,INSTR(A.RTE_SQLERRM,':')-1) ERROR_CODE,
    SUBSTR(A.RTE_SQLERRM,INSTR(A.RTE_SQLERRM,':')+1) ERROR_MESSAGE,
    C.RTA_LOB_NAME MAPPING_NAME,SUBSTR(B.RTS_SOURCE_COLUMN,(INSTR(B.RTS_SOURCE_COLUMN,'.')+1)) TARGET_COLUMN,
    B.RTS_VALUE TARGET_VALUE,C.RTA_PRIMARY_SOURCE PRIMARY_SOURCE,C.RTA_PRIMARY_TARGET TARGET_TABLE,
    C.RTA_DATE ERROR_TIMESTAMP
    FROM OWBREPO.WB_RT_ERRORS A,OWBREPO.WB_RT_ERROR_SOURCES B, OWBREPO.WB_RT_AUDIT C
    WHERE C.RTA_IID = A.RTA_IID
    AND C.RTA_IID = B.RTA_IID
    AND A.RTA_IID = B.RTA_IID
    AND A.RTE_ROWKEY =B.RTE_ROWKEY
    --AND RTS_SEQ =1  
    AND B.RTS_SEQ IN (SELECT POSITION FROM ALL_CONS_COLUMNS A,ALL_CONSTRAINTS B
    WHERE A.TABLE_NAME = B.TABLE_NAME
    AND A.CONSTRAINT_NAME = B.CONSTRAINT_NAME
    AND A.TABLE_NAME =MAP_ID
    AND CONSTRAINT_TYPE ='P')
    AND A.RTA_IID =(
    SELECT MAX(RTA_IID) FROM OWBREPO.WB_RT_AUDIT WHERE RTA_PRIMARY_TARGET ='"'||MAP_ID||'"');
    CURSOR C3 IS
    SELECT A.RTE_ROWKEY ERR_ROWKEY,SUBSTR(A.RTE_SQLERRM,1,INSTR(A.RTE_SQLERRM,':')-1) ERROR_CODE,
    SUBSTR(A.RTE_SQLERRM,INSTR(A.RTE_SQLERRM,':')+1) ERROR_MESSAGE,
    C.RTA_LOB_NAME MAPPING_NAME,SUBSTR(B.RTS_SOURCE_COLUMN,(INSTR(B.RTS_SOURCE_COLUMN,'.')+1)) TARGET_COLUMN,
    B.RTS_VALUE TARGET_VALUE,C.RTA_PRIMARY_SOURCE PRIMARY_SOURCE,C.RTA_PRIMARY_TARGET TARGET_TABLE,
    C.RTA_DATE ERROR_TIMESTAMP
    FROM OWBREPO.WB_RT_ERRORS A,OWBREPO.WB_RT_ERROR_SOURCES B, OWBREPO.WB_RT_AUDIT C
    WHERE C.RTA_IID = A.RTA_IID
    AND A.RTA_IID = B.RTA_IID (+)
    AND A.RTE_ROWKEY =B.RTE_ROWKEY (+)
    AND A.RTA_IID =(
    SELECT MAX(RTA_IID) FROM OWBREPO.WB_RT_AUDIT WHERE RTA_PRIMARY_TARGET ='"'||MAP_ID||'"');
    -- main body
    BEGIN
    DELETE ED_ODS.MAP_ERROR_LOG WHERE TARGET_TABLE ='"'||MAP_ID||'"';
    COMMIT;
    OPEN C1;
    FETCH C1 INTO V_COUNT;
    IF V_COUNT >0 THEN
    FOR REC IN C2
    LOOP
    INSERT INTO ED_ODS.MAP_ERROR_LOG
    (Error_seq ,
    Mapping_name,
    Target_table,
    Target_column ,
    Target_value ,
    Primary_table ,
    Error_rowkey ,
    Error_code ,
    Error_message ,
    Error_timestamp)
    VALUES(
    ED_ODS.MAP_ERROR_LOG_SEQ.NEXTVAL,
    REC.MAPPING_NAME,
    REC.TARGET_TABLE,
    REC.TARGET_COLUMN,
    REC.TARGET_VALUE,
    REC.PRIMARY_SOURCE,
    REC.ERR_ROWKEY,
    REC.ERROR_CODE,
    REC.ERROR_MESSAGE,
    REC.ERROR_TIMESTAMP);
    END LOOP;
    ELSE
    FOR REC IN C3
    LOOP
    INSERT INTO ED_ODS.MAP_ERROR_LOG
    (Error_seq ,
    Mapping_name,
    Target_table,
    Target_column ,
    Target_value ,
    Primary_table ,
    Error_rowkey ,
    Error_code ,
    Error_message ,
    Error_timestamp)
    VALUES(
    ED_ODS.MAP_ERROR_LOG_SEQ.NEXTVAL,
    REC.MAPPING_NAME,
    REC.TARGET_TABLE,
    REC.TARGET_COLUMN,
    REC.TARGET_VALUE,
    REC.PRIMARY_SOURCE,
    REC.ERR_ROWKEY,
    REC.ERROR_CODE,
    REC.ERROR_MESSAGE,
    REC.ERROR_TIMESTAMP);
    END LOOP;
    END IF;
    CLOSE C1;
    COMMIT;
    -- NULL; -- allow compilation
    EXCEPTION
    WHEN OTHERS THEN
    NULL; -- enter any exception code here
    END;

  • How to run OWB mappings from SQL*Plus

    Hi:
    I used to run OWB mappings using the sample code RUN_MY_OWB_STUFF in a customized PL/SQL procedure. This works for OWB 10g release 1 but not for OWB Paris (10g Release 2) because the execution always returns FAILURE.
    Is there something new in OWB Paris that RUN_MY_OWB_STUFF doesn't work anymore?
    Thanks,
    Hazbleydi C. Verástegui

    Hi Maruthi:
    I already check the input parameters of the mapping. I'm setting them as a custom parameters. This is the output of the execution:
    16:01:11 SQL> EXEC PR_RUN_OWBMAPPING_TABLA2('MPG_EMPLEADOS_NOMINA_PERIODO',2007,01);
    Stage 1: Decoding Parameters
    | location_name=LOC_DM_STAGING
    | task_type=PLSQL
    | task_name=MPG_EMPLEADOS_NOMINA_PERIODO
    Stage 2: Opening Task
    | l_audit_execution_id=39635
    Stage 3: Overriding Parameters
    | P_ANO%CUSTOM='2007'
    | P_MES%CUSTOM='1'
    Stage 4: Executing Task
    | l_audit_result=3 (FAILURE)
    Stage 5: Closing Task
    Stage 6: Processing Result
    | exit=3
    By the way, RUN_MY_OWB_STUFF is the same as RUN_OWB_CODE.sql except for the two first parameters (p_result and p_audit_id):
    create or replace procedure run_owb_code
    ( p_result out number
    , p_audit_id out number
    , p_repos_owner in varchar2 default null
    , p_location_name in varchar2 default null
    , p_task_type in varchar2 default null
    , p_task_name in varchar2 default null
    , p_system_params in varchar2 default '","'
    , p_custom_params in varchar2 default '","'
    , p_oem_friendly in number default 0
    is
    CREATE OR REPLACE function run_my_owb_stuff
    ( p_repos_owner in varchar2 default null
    , p_location_name in varchar2 default null
    , p_task_type in varchar2 default null
    , p_task_name in varchar2 default null
    , p_system_params in varchar2 default '","'
    , p_custom_params in varchar2 default '","'
    , p_oem_friendly in number default 0
    ) return number
    is
    How do you invoke your wrapper PL/SQL with these two first parameters?
    Thanks in advance,
    Hazbleydi C. Verástegui

  • Need Help: Using Ref Cursor in ProC to call a function within a Package

    I'm calling a function within a package that is returning a REF CURSOR.
    As per the Oracle Pro*C Programmer's Guide, I did the following:
    1) declared my cursor with a: EXEC SQL BEGIN DECLARE SECTION and declared the cursor as: SQL_CURSOR my_cursor;
    2) I allocated the cursor as: EXEC SQL ALLOCATE :my_cursor;
    3) Via a EXEC SQL.....END-EXEC begin block
    I called the package function and assign the return value to my cursor
    e.g. my_cursor := package.function(:host1, :host2);
    Now, the only difference between my code and the example given in the Pro*C Programmer's Guide is that the example calls a PROCEDURE within a package that passes back the REF CURSOR as an OUT host variable.
    Whereas, since I am calling a function, the function ASSIGNS the return REF CURSOR in the return value.
    If I say my_cursor := package.function(:host1, :host2); I get a message stating, "PLS-00201: identifier MY_CURSOR" must be declared"
    If I say :my_cursor := package.function(:host1, :host2); I get a message stating, "ORA-01480: trailing null missing from STR bind value"
    I just want to call a package function and assign the return value to a REF CURSOR variable. There must be a way of doing this. I can do this easily in standard PL/SQL. How can this be done in Pro*C ???
    Thanks for any help.

    Folks, I figured it out. For those who may face this problem in the future you may want to take note for future reference.
    Oracle does not allow you to assign the return value of a REF CURSOR from a FUNCTION ( not Procedure - - there is a difference) directly to a host variable. This is the case even if that host variable is declared a CURSOR variable.
    The trick is as follows: Declare the REF CURSOR within the PL/SQL BEGIN Block, using the TYPE statement, that will contain the call to the package function. On the call, you then assign the return REF CURSOR value that the function is returning to your REF CURSOR variable declared in the DECLARE section of the EXEC SQL .... END-EXEC PL/SQL Block.
    THEN, assign the REF CURSOR variable that was populated from the function call to your HOST cursor varaible. Then fetch this HOST Cursor variable into your Host record structure variable. Then you can deference individual fields as need be within your C or C++ code.
    I hope this will help someone facing a deadline crunch. Happy computing !

  • Function call in procedure within Package Body

    I am a novice in PL/SQL so that I can't find out where the problem is. I am testing a function call in procedure within a Package Body.
    But the PL/SQL Complier doesn't compile the package body but I don't know what I do wrong. Plz let me know how to call a function in procedure within a Package Body?
    Here are the Packaget test programs..
    CREATE OR REPLACE PACKAGE manage_students
    IS
    PROCEDURE find_sname;
    PROCEDURE find_test;
    PROCEDURE find_test_called;
    FUNCTION GET_LASTMT
    RETURN SEQUENCE_TEST.SEQ_NO%TYPE;
    END manage_students;
    CREATE OR REPLACE PACKAGE BODY manage_students AS
    v_max_nbr SEQUENCE_TEST.SEQ_NO%TYPE;
    PROCEDURE find_sname
    IS
    BEGIN
    BEGIN
    SELECT MAX(SEQ_NO)
    INTO v_max_nbr
    from SEQUENCE_TEST;
    DBMS_OUTPUT.PUT_LINE('MAX NUMBER is : '||v_max_nbr);
    EXCEPTION
    WHEN OTHERS
    THEN DBMS_OUTPUT.PUT_LINE('Error in finding student_id: ');
    RETURN;
    END;
    COMMIT;
    EXCEPTION
    WHEN OTHERS
    THEN DBMS_OUTPUT.PUT_LINE('Error in finding student_id: ');
    END find_sname;
    PROCEDURE find_test
    IS
    BEGIN
    BEGIN
    DBMS_OUTPUT.PUT_LINE('MAX NUMBER Called from another procedure : '||v_max_nbr);
    EXCEPTION
    WHEN OTHERS
    THEN DBMS_OUTPUT.PUT_LINE('Error in finding student_id: ');
    RETURN;
    END;
    COMMIT;
    EXCEPTION
    WHEN OTHERS
    THEN DBMS_OUTPUT.PUT_LINE('Error in finding student_id: ');
    END find_test;
    FUNCTION GET_LASTMT
    RETURN SEQUENCE_TEST.SEQ_NO%TYPE
    IS
    v_max_nbr SEQUENCE_TEST.SEQ_NO%TYPE;
    BEGIN
    SELECT MAX(SEQ_NO)
    INTO v_max_nbr
    from SEQUENCE_TEST;
    RETURN v_max_nbr;
    EXCEPTION
    WHEN OTHERS
    THEN
    DECLARE
    v_sqlerrm VARCHAR2(250) :=
    SUBSTR(SQLERRM,1,250);
    BEGIN
    RAISE_APPLICATION_ERROR(-20003,
    'Error in instructor_id: '||v_sqlerrm);
    END;
    END GET_LASTMT;
    PROCEDURE find_test_called
    IS
    BEGIN
    BEGIN
    V_max := Manage_students.GET_LASTMT;
    DBMS_OUTPUT.PUT_LINE('MAX_NUMBER :'|| V_max);
    EXCEPTION
    WHEN OTHERS
    THEN DBMS_OUTPUT.PUT_LINE('Error in finding student_id: ');
    RETURN NULL;
    END;
    COMMIT;
    EXCEPTION
    WHEN OTHERS
    THEN DBMS_OUTPUT.PUT_LINE('Error in finding student_id: ');
    END find_test_called;
    END manage_students;
    DECLARE
    v_max SEQUENCE_TEST.SEQ_NO%TYPE;
    BEGIN
    manage_students.find_sname;
    DBMS_OUTPUT.PUT_LINE ('Student ID: Execute.');
    manage_students.find_test;
    manage_students.find_test_called;
    END;
    -----------------------------------------------------------------------------------------------

    Hi,
    Welcome to the forum!
    You'll find that there are a lot of people willing to help you.
    Are you willing to help them? Whenever you have a problem, post enough for people to re-create the problem themselves. That includes CREATE TABLE and INSERT statements for all the tables you use.
    Error messages are very helpful. Post the complete error message you're getting, including line number. (It looks like your EXCEPTION sections aren't doing much, except hiding the real errors. That's a bad programming practice, but probably not causing your present problem - just a future one.)
    Never post unformatted code. Indent the code to show the extent of each procedure, and the blocks within each one.
    When posting formatted text on this site, type these 6 characters:
    \(all small letters, inside curly brackets) before and after each section of formatted test, to preserve the spacing.
    For example, the procedure find_test_called would be a lot easier to read like this:PROCEDURE find_test_called
    IS
    BEGIN
         BEGIN
              V_max := Manage_students.GET_LASTMT;
              DBMS_OUTPUT.PUT_LINE ('MAX_NUMBER :' || V_max);
         EXCEPTION
              WHEN OTHERS
              THEN
                   DBMS_OUTPUT.PUT_LINE ('Error in finding student_id: ');
                   RETURN      NULL;
         END;
         COMMIT;
    EXCEPTION
         WHEN OTHERS
         THEN
              DBMS_OUTPUT.PUT_LINE ('Error in finding student_id: ');
    END find_test_called;
    It's much easier to tell from the code above that you're trying to return NULL from a procedure.  Only functions can return anything (counting NULL); procedures can have RETURN statements, but that single word"RETURN;" is the entire statement.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Want to run owb mappings thru job schedule

    hi all,
    need some help here. hope u guys can give me an idea. all this while i've been executing my owb mappings thru the deployment manager. instead of doing so, can i execute the mappings thru scheduling?? if yes, how can i do it??
    i've tried using the OMS. From there i can create some jobs, but it's not taking from the mappings. i'm still trying. hope to get some good tips on how to do it. thanks in advance.

    Hmm, trying to execute it from the 10g web OEM, I ran into a problem - it returns the following:
    ORA-27370: job slave failed to launch a job of type EXECUTABLE ORA-27300: OS system dependent operation:accessing execution agent failed with status: 2 ORA-27301: OS failure message: The system cannot find the file specified. ORA-27302: failure occurred at: sjsec 6 ORA-27303: additional information: The system cannot find the file specified.
    I'm wondering, since I have logged in locally on the server, and the file really do exist...
    You have a clue?
    Yours
    Kim

Maybe you are looking for