DML Debugging is a nightmare!

It's not the first time I change some items and suddenly the Automatic DML process raises an Oracle error I could not understand. The debug function cannot help me. Why doesn't show it the generated SQL? It would make debugging so much easier!
Now I have an ORA-00936: missing expression without knowing why...

Hello,
Try to run the Database Object Dependencies report on your application (Application Reports>Shared Components>application). In the bottom of the report there is a section called parsing errors. Sometimes the errors you are referring to can be found there, with the relevant code.
Hope this helps,
Arie.

Similar Messages

  • JDeveloper, ADF, lack of support and bleak future

    Hi,
    I'm a seasoned Java and .NET developer, used to many environments and frameworks. A happy user of Oracle databases.
    For a very Oracle oriented client I started with a team of developer a project using JDeveloper (no choice). After 4 months of using JDeveloper, ADF to build web sites, here are some thoughts I would like to share. This remarks only focus on that products, because I have a lot of respect for the Oracle databases and had a lot of success with them.
    I am starting to get depressed about the very few blogs (most from Oracle) talking about JDeveloper and ADF, the lack of books, and the Oracle forums.
    Moreover, most of the time you never get an answer to your problems, sometimes untested not working 'solutions', and a very very few times a working solution. Help is sparse, the community is missing.
    If Oracle wants to promote its framework, it has to boost the number of tutorials, examples and support.
    Googling about ADF is most of the time a non sense since you always land on the same 3 blogs and the Oracle forums.
    Proof of non use by the community ?
    If you try on www.indeed.com to find statistics about JDeveloper or ADF jobs you get another frightening proof.
    Sometimes you find a piece of code or a tutorial that may help, but you realize it works only on some specific release of JDeveloper.
    What makes me angry is when you ask why your code works on the x.x.x.x version but not the newest version, and the only answer you get is stay with x.x.x.x version (I won't bother to fix your 10 lines or code or even give you a direction to do it (maybe coz I don't understand myself were the breaking changes are)).
    JDeveloper is damn too slow ? You should have a dual-core and at least 2 Go of memory, you poor thing ! Is Java for rich people ?
    Debuging is a nightmare. Compared to Eclipse or others it is not practical at all.
    I'm happy when I can create a few pages drag and dropping controls. Business components are also a good thing. It speeds up my development. But since development is not just UI and generating business components, I lose a lot of time every time I want to write code, every time I do something "exotic" it becomes a pain in the ass.
    My problem here is that the architecture and JDeveloper constraint the developer a lot. I don't even talk about the fact that everything is only Oracle database oriented (openess ?). Even changing your page layout is a pain. Positioning controls is non trivial. As a whole, I would say that this whole thing imposes you to adapt to it, it doesn't adapt to you and your way of working.
    Most results I saw look like the Oracle websites.
    I could go on about the various bugs and problems that plague JDeveloper. Like the refactoring (when usable) that leave old and annoying stuff in your model XML, like the bugs in the diagrams, like problems related to auto-binding on the page and manually changing controls ID, various synchronization problems between pages and backing beans, adding upload is a mess, OrdDomain types are buggy, regions doesn't work well in the designer, and so on...
    My point is that I feel the whole thing is not mature. And Oracle seems to fix some issues with the release of JHeadStart. Sometimes you fix things by integrating JHeadStart stuff. JHeadStart is probably a great thing and a time saver if you don't do too much "exotic" screens and code, but does it means that JDeveloper+ADF and classic development becomes a second class citizen ?
    This is sad, since the ADF framework and JDeveloper look good and are worth of a more widespread usage. But marketing and support are way way far behind other commercial and open-source solutions. When I see what is planned for JDeveloper 11 and I compare it to others (Java or not). When I look at the developers needs and expectations, I feel we are losing the race.
    Maybe Oracle would like to hand over some of the framework to the community, but my feeling is that the community is already commited on other exciting and less constraining frameworks and tool, and this community may well work in a way that doesn't fit Oracle vision. Future will tell.
    Cheers.

    Hi,
    thanks for the detailed comment. I appreciate the time you spent writing this up as this helps to improve the product. Below is a first - quick and brief response to some of your statements.
    ... for documentation and tutorials
    http://www.oracle.com/technology/products/adf/learnadf.html
    Especially the ADF Developer Guide for 4 GL developers earns a lot of praise among J2EE developers.
    http://download.oracle.com/docs/html/B25947_01/toc.htm
    ... for books
    http://www.oracle.com/technology/tech/java/jsf.html
    Sometimes you find a piece of code or a tutorial that may help, but you realize it works only on some specific release of JDeveloper. What makes me angry is when you ask why your code works on the x.x.x.x version but not the newest version, and the only answer you get is stay with x.x.x.x version
    Of course samples need to be created to some point in time with a specific version. We have SRDemo as our main - maintained - reference demo I suggest you download this sample from OTN using help--> check for updates. Note that SRDemo contains code solutions for most developer cases and also is available in 10.1.3.1
    I'm happy when I can create a few pages drag and dropping controls. Business components are also a good thing. It speeds up my development. But since development is not just UI and generating business components, I lose a lot of time every time I want to write code, every time I do something "exotic" it becomes a pain in the ***.
    What is exotic, and what are the questions you didn't get an answer for ? I see that this is your first posting on OTN, so I am wondering under which account you posted the other questions that did not get an answer.
    Googling about ADF is most of the time a non sense since you always land on the same 3 blogs and the Oracle forums. Proof of non use by the community ?
    Isn't OTN a community ? I don't think that we need another discussion forum and looking at OTN it appears very active.
    I don't even talk about the fact that everything is only Oracle database oriented (openess ?).
    Not true. Please prove your claim.
    Even changing your page layout is a pain. Positioning controls is non trivial. As a whole, I would say that this whole thing imposes you to adapt to it, it doesn't adapt to you and your way of working. Most results I saw look like the Oracle websites.
    Now you are barking up the wrong tree, blaming ADF for what is JavaServer Faces layouting. You don't have to use JSF but can go for JSP /Struts and/or Swing development. What is the view layer technology of your choice that allows you to do better layouting ?
    I could go on about the various bugs and problems that plague JDeveloper
    Yes, please post them all
    ... regions doesn't work well in the designer, and so on...
    Of course, because regions are not officially supported. JDeveloper 11 - I know you don't want to hear future - will have full templating (going far beyound of what facelets do) and region support
    My point is that I feel the whole thing is not mature. And Oracle seems to fix some issues with the release of JHeadStart.
    JHeadstart is a consulting offering and not meant to fix the product.
    ... but does it means that JDeveloper+ADF and classic development becomes a second class citizen ?
    No comment for this statement as it is based on a wrong observation
    This is sad, since the ADF framework and JDeveloper look good and are worth of a more widespread usage. But marketing and support are way way far behind other commercial and open-source solutions. When I see what is planned for JDeveloper 11 and I compare it to others (Java or not).
    Note that only a fraction of new features in JDeveloper 11 leaked out so far or have been mentioned in the recent statement of direction. JDeveloper has many more features that we don't yet promote because the software isn't available.
    Please note that we give ADF to the community. Its just we are not giving it to the open soutce community but the J2EE community (JSR-227)
    Frank

  • BPM-  ADF binding files architecture for ADF human taskflow.

    Hi,
    I wast to know what is the architecture behind the hundreds of the file generated for the BPM adf integration for the human taskflow.
    Is there any method of debugging why data coming to BPM human taskflow is not coming properly to ADF.
    I appeciate any debug pointers, although these files are clearly xml files and we have no control over generation of these files but still we want to know how data been populated and how if any error occured of data corruption, how we will resolve.
    REF we are facing major issues with the data corruption issues with the ADF BPM components.
    Thanks
    VIpin

    Hi Vipin
    This post has an interesting discussion related to your question. I am glad BPM is infact generating all these complex xml files behind the screens and taking care of so many things. Thanks to ADF framework. Yes, I totally agree, debugging may be nightmare to begin with. But with divide and rule, you can get over it. End of the Day its just pure Workflow and a complex ADF. ADF can be stripped out carefully and run all the actonis from a normal web application. If we design properly as pure SOA, we create back end services like EJBs that can be consumed from WebServices or ADF Layer. Once we have this we can integrate these Services into any BPM Process.
    Re: Integrating BPM taskflows into an ADF application
    Now, coming back to your questions:
    1. You have a Complex BPM Process with complex BO (business objects), Arrays of BOs. I hope you have XSD for your BOs and using them only you created BusinesObjects and ProcessDataObjects. Now lets assume you have a BPM Process that uses this complex data structure. Lets take a very first Human Task initiaor who may see a Task Details page with your compelx objects. Lets say, in Task Details page, he says a header section with 10 fields. Another section with a Table of Multiple Rows and columns (arrays of Data), etc etc.
    2. NOW the main question is, when this User Saves or Submits the Task, you should be doing something with that Data ? Am I right. Are you Saving it to any Database or everything is in the Payload itself. If so, I hope you have complex. If its payload itself, then I hope you have a complex strucutre to pass arrays of data through out the process.
    3. Assuming all this gets Stored into backend Database. Lets not worry about retrieving it back when task goes to second user. Always Payload will store the key IDs lke dataId like OrderId, CustomerId etc and using that it can pull any data from backend and show on task details page.
    4. This is where the ADF comes into picture. So even before you integrate your complex backend data with Process, first create a simple WebAppilcation. If you have EJB methods to handle this data, you create Data controls, bindings. Bindings will help generate the Screens. So you can first test your application completely here. Once all this is working, thats when you call these Services from your Process.
    And beauty is with new release of BPM Suite (should be in BPM 11.5 + FP (Feature Pack)), they have a concept of Simulation. This should help you to simulate the Process without any real data and JUST focus and test on the Flow of the Process. This comes real handy for testing.
    And for the data used in your process, you have ADF Tools to create stand alone ADF Application.
    We have some applications like yours with very complex data structure, arrays that gets stored like in 25 tables with references going everywhere. First we built a simple data layer using EJBs and JPA layer (JPA Entities). These Entities have annotated methods to take care of most of the things. In the EJB we exposed some generic methods instead of adf generating them, due to complex data structre. Then we created data controls and bindings. Create Custom JSPX Files. This is where we ended up having our own Layout for the Data. I hope you have already seen by default, task details layout page generated is NOT usabe at all. It generates all the data in one Single Long column. We do not use that. Since we know data, we created our own Task details page. The only thing we add is the Actions bar and comments and attachment section. When you auto generate a taskdetails page for any .TASK file, you will see DataBindins created for Payload, Actions, and also separately for coments and attachmetns. Just drag these comments and attachments on to your page and define your own layout.
    Re: deploying a large Oracle BPM Application with multiple UI projects (Single taskdetails for multiple UIs and Tasks)
    Re: What exactly 'PAYLOAD' Means??? (Simple definition for Payload word referred in any Process)
    If you see one of the old posts, there is a way to reuse just one Single TaskDetals page for Multiple different Human .TASK files. All that matters iis the top Actions Menu that are differenet for each human task like someone can Submit, someone can only Approve or Reject etc. We can club all these Actions into single actionsMenu.jsff and put this on TaskDetails page and assing to all the .task files. Menus are automatically disabled/enabled using workflow APIs. You do not need any special coding for them. Look at code snipet for any actions button that has like isAllowedAction and pass the name of the action. Workflow APIs see if that .TASK file has a Action named with that internally.
    In conclusion, there is a decent clear gap between Process and the ADF Generated Task Details page.
    Thanks
    Ravi Jegga

  • Filling space will null components...

    I have been trying to find a way to fill in blank spaces in both a gridlayout and flowlayout, to squeeze existing components together. I thought that I could just add a null component to the panel but that doesnt work. Is there a good way to do this, or should I just create regular components and set their visibility to false?

    I wouldn't create any null components. That's a hack that will only make debugging a bigger nightmare as the layout gets more complex. Also, because you are trying to fill in blank spaces FlowLayout should not be used at all - since it may display radically different when resized, etc. Using GridLayout and setting components to false will work but its somewhat ugly.
    There's a very simple yet effective Layout manager that combines the usefulness of FlowLayout and GridLayout. It is called VerticalLayout, is simple to use, and is free to download. I highly reccommend it.
    See:
    http://www.cellspark.com/vl.html
    Hope this helps...

  • How to debug hanging DML job

    How I have these dml jobs that hangs I have use
    ALTER SESSION set events '10046 trace name context forever,level 12';
    but it looks like o trace is being generated as it is still running and on v$session it says one is waiting on configuraton and one is waiting on concurrency ?
    How do I debug this kind of hanging situation?

    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
    PL/SQL Release 10.2.0.4.0 - Production
    CORE     10.2.0.4.0     Production
    TNS for Solaris: Version 10.2.0.4.0 - Production
    NLSRTL Version 10.2.0.4.0 - ProductionIt is weired that one of the session is waiting on a TM lock on PLSQL_TRACE_EVENTS and PLSQL_TRACE_RUNS
    and the event is log file switch completion
    ANd it is actually hanging at inserting into these two tables.
    Would it be just an oracle_bug ?
    I am thinking killing the sessions and running it without pl/sql trace and see what happens ?

  • How do I view data from OLAP DML program or statement?

    Hi
    I'm struggling to find any information on this topic anywhere on the net:
    How to view data produced by an Oracle OLAP DML program or statement.
    Background :
    I am using the latest AWM to create and maintain dimensions, cubes and measures. However, I've noticed that AWM, Discoverer OLAP, BI Beans, Excel Plug-In et al only provide a fixed set of formula and expressions.
    For example, I wanted to created a Standard Deviation (STDEV) on measure. After much searching I learnt that I could do this by creating a custom measure in AWM by importing a measure defined in an XML dcoument as it's not provided by AWM. The output in Discoverer OLAP on the surface seems to give the correct results, however when drilling from high level to lower level of time time dimension hierarchy Discoverer includes the parent value in the calculation and renders the values incorrect.
    My alternative is to use OLAP DML, as it provides a richer range of formuale and calculations possibilities and I was hoping to use this functionality to do create the measures. I have the distinct impression, however, that OLAP Worksheet is the only interface out there to do this.
    It seems very primitive and limited with regards to data output, almost like SQL*Plus in many ways.
    The burning questions I have are :
    1) Do I need to write DML programs to perform these custom measure calculations and add them to cubes or do I import the custom measures via AWM and XML?
    2) If the answer to question 1 is DML programming, is there a way of viewing the OLAP data output through a GUI interface without embedding the statements in SQL.
    3) Has anyone experienced or noticed the same problem with Discoverer OLAP, AWM Viewer that I mentioned above? i,e, statistical functions performed on whole dimension hierarchy rather than lower levels.
    I'm hoping someone out there knows what I am trying to do or get at. Keith, any ideas or suggestions?
    Thanks
    Kind Regards
    Greg

    Hi Greg,
    There are two ways to achieve what you want. Both require the use of custom calculations which cannot be created via the calculation wizard within AWM. To do this the easiest way is step outside of AWM and use the Excel Calculation utility that is on the OLAP OTN home page:
    Creating OLAP Calculations using Excel
    http://download.oracle.com/otn/java/olap/SpreadsheetCalcs_10203.zip
    Readme
    http://www.oracle.com/technology/products/bi/olap/OLAP_SpreadsheetCalcs.html
    (Oracle OLAP DML Reference contains a list of all the OLAP functions that can be used to create a custom calculation. http://www.oracle.com/technology/products/bi/olap/OLAP_DML_10.2.zip)
    The Excel tool lets you assign your own formula to a measure and then uploads that measure definition into your AW. It is possible to import a custom calculation template into AWM using the menu option on the Calculated Measure node of each cube, but it is safer to use the Excel Worksheet as this directly uses the public XML API and is always best to use a public API rather than hacking XML templates.
    There are two types of custom calculation:
    1) Formula: using a formula you can directly call any of the OLAP functions. For example to create a measure that returns the standard deviation for a measure then you would enter the following as the formula for your calculated measure:
    stddev(sales_revenue, time)
    The easiest way to test if the measure is working as expected is to use the data viewer within AWM.
    2) Programs - if the function you need is not provided or you want to do special processing to return a result you can create an OLAP DML program which can return a result. To do this use OLAP Worksheet to define the program and add a datatype to the DEFINE statement, such as :
    DEFINE PRG_SD_SALES PROGRAM DECIMAL
    In the program return the value you have calculated within your program. Within the program you can do just about anything but be aware that your program is going to fire for every cell within your virtual cube so it must be efficient and fast to execute. For a measure then you would enter the following as the formula for your calculated measure:
    prg_sd_sales(time, products, geographies, channels).
    The actual program code would look something like this:
    DEFINE PRG_SD_REVENUE PROGRAM DECIMAL
    PROGRAM
    argument T_TIME TIME
    argument T_PRODUCT PRODUCTS
    argument T_GEOGRAPHY GEOGRAPHIES
    argument T_CHANNEL CHANNELS
    variable D_RETURN decimal
    TEMPSTAT TIME, PRODUCTS, GEOGRAPHIES, CHANNELS
    do
    limit PRODUCTS to T_PRODUCT
    limit CHANNELS to T_CHANNEL
    limit GEOGRAPHIES to T_GEOGRAPHY
    limit TIME to T_TIME
    limit TIME add descendants using TIME_PARENTREL
    limit TIME keep TIME_LEVELREL 'CAL_MONTH'
    D_RETURN = stddev(SALES_REVENUE)
    doend
    return D_RETURN
    END
    This code computes a standard deviation the all months within the specified time range, at year level for all 12 months, at quarter level for the three months within the quarter ans returns NA at the month level.
    As the code executes within a implicit loop you can only change the status fo dimensions that for part of that implicit by using the TEMPSTAT command. To test the program at the command line use the OLAP Worksheet and the SHOW command to just return one cell of data, DO NOT SIMPLY USE THE RPR COMMAND because you will have to wait for the whole cube to be returned. If you want to use the RPR command make sure you limit your base dimensions first! You can use PRGTRACE to debug your program code it is not working as expected. Again, the easiest way to test if the measure is working as expected is to use the data viewer within AWM, although this will not return debug information so send all your debug output to a file to capture any errors and/or trace the execution flow.
    Hope this helps
    Keith Laker
    Oracle EMEA Consulting
    BI Blog: http://oraclebi.blogspot.com/
    DM Blog: http://oracledmt.blogspot.com/
    BI on Oracle: http://www.oracle.com/bi/
    BI on OTN: http://www.oracle.com/technology/products/bi/
    BI Samples: http://www.oracle.com/technology/products/bi/samples/

  • BULK INSERT into View w/ Instead Of Trigger - DML ERROR LOGGING Issue

    Oracle 10.2.0.4
    I cannot figure out why I cannot get bulk insert errors to aggregate and allow the insert to continue when bulk inserting into a view with an Instead of Trigger. Whether I use LOG ERRORS clause or I use SQL%BULK_EXCEPTIONS, the insert works until it hits the first exception and then exits.
    Here's what I'm doing:
    1. I'm bulk inserting into a view with an Instead of Trigger on it that performs the actual updating on the underlying table. This table is a child table with a foreign key constraint to a reference table containing the primary key. In the Instead of Trigger, it attempts to insert a record into the child table and I get the following exception: +5:37:55 ORA-02291: integrity constraint (FK_TEST_TABLE) violated - parent key not found+, which is expected, but the error should be logged in the table and the rest of the inserts should complete. Instead the bulk insert exits.
    2. If I change this to bulk insert into the underlying table directly, it works, all errors get put into the error logging table and the insert completes all non-exception records.
    Here's the "test" procedure I created to test my scenario:
    View: V_TEST_TABLE
    Underlying Table: TEST_TABLE
    PROCEDURE BulkTest
    IS
    TYPE remDataType IS TABLE of v_TEST_TABLE%ROWTYPE INDEX BY BINARY_INTEGER;
    varRemData remDataType;
    begin
    select /*+ DRIVING_SITE(r)*/ *
    BULK COLLECT INTO varRemData
    from TEST_TABLE@REMOTE_LINK
    where effectiveday < to_date('06/16/2012 04','mm/dd/yyyy hh24')
    and terminationday > to_date('06/14/2012 04','mm/dd/yyyy hh24');
    BEGIN
    FORALL idx IN varRemData.FIRST .. varRemData.LAST
    INSERT INTO v_TEST_TABLE VALUES varRemData(idx) LOG ERRORS INTO dbcompare.ERR$_TEST_TABLE ('INSERT') REJECT LIMIT UNLIMITED;
    EXCEPTION WHEN others THEN
    DBMS_OUTPUT.put_line('ErrorCode: '||SQLCODE);
    END;
    COMMIT;
    end;
    I've reviewed Oracle's documentation on both DML logging tools and neither has any restrictions (at least that I can see) that would prevent this from working correctly.
    Any help would be appreciated....
    Thanks,
    Steve

    Thanks, obviously this is my first post, I'm desperate to figure out why this won't work....
    This code I sent is only a test proc to try and troubleshoot the issue, the others with the debug statement is only to capture the insert failing and not aggregating the errors, that won't be in the real proc.....
    Thanks,
    Steve

  • How to debug and find the exact constraint violation error

    {122712 14:22:36:ErrorCode -1 with ErrorMessage as ORA-00001: unique constraint (OPS$CMS.PK_TB_ML_EXER_UPLOAD) violated has occured for [SSO16063259009], [CMSCOST_USER] pk_xop_subsales.pr_process_exer }
    {PROCEDURE pr_process_exer(
    p_voucher_num           tb_xop_order_manager_t.voucher_num%TYPE,
    p_status_type           tb_xop_order_manager_t.status_type%type,
    p_dest                    tb_xop_order_manager_t.dest%type,
    p_reference_key            tb_xop_order_manager_t.reference_key%type,
    p_seq_num                tb_xop_order_manager_t.seq_num%type,
    p_return_code            tb_xop_order_manager_t.return_code%type,
    p_reason_desc           tb_xop_order_manager_t.reason_desc%type,
    p_activity_qty            tb_xop_order_manager_t.activity_qty%type,
    p_leaves_qty            tb_xop_order_manager_t.leaves_qty%type,
    p_exec_price            tb_xop_order_manager_t.exec_price%type,
    p_current_status        tb_xop_order_manager_t.current_status%type,
    p_err_cur          OUT  ref_cursor)
    IS
    CURSOR get_order_dtls(v_voucher_num tb_xop_order_manager_t.voucher_num%type)
    IS
    SELECT *
    FROM   tb_xop_order_manager_t
    WHERE  voucher_num = v_voucher_num;
    CURSOR get_mail_cd(v_opt_num OPTIONEE.opt_num%TYPE) IS
          SELECT mail_cd, sp_mail_cd
          FROM XOP_OPTIONEE
          WHERE opt_num = v_opt_num;
    cursor get_opt_dtls(v_opt_num OPTIONEE.opt_num%TYPE) IS
    select
    SUBSTR(trim(O.name_first) || ' ' || trim(O.name_mi) || ' ' ||
              trim(O.name_last), 1, 35) p_name,
            SUBSTR(O.address1, 1, 35) opt_addr1,
              SUBSTR(O.address2, 1, 35) opt_addr2,
              SUBSTR(O.address3, 1, 35) opt_addr3,
              SUBSTR(O.address4, 1, 35) opt_addr4,
              SUBSTR(O.address5, 1, 35) opt_addr5,
              SUBSTR(O.address6, 1, 35) opt_addr6,
            SUBSTR(trim(O.city) || ' ' || trim(O.state) || ' ' ||
            trim(O.zip) || ' ' || trim(O.country), 1, 35) city_state_zip_country,
            trim(O.city) city,
            trim(O.state) state,
            trim(O.zip) zip,
            trim(O.country) country
    from  optionee o
    where o.opt_num = v_opt_num;
    --CQ:PCTUP00210726- Added wire instructions audit for deleted wire info.
    CURSOR c_wire_instruction (
          in_wire_seq_no           TB_XOP_WIRE_INSTRUCTIONS.wire_seq_no%TYPE ) IS
          SELECT ml_brok_acct_num,
                 ssn,
                 plan_num,
                 instr_type,
                 aba_routing_num,
                 swift_routing_code,
                 bank_name,
                 bank_acct_num,
                 name_on_account,
                 bank_addr_1,
                 bank_addr_2,
                 bank_addr_3,
                 city,
                 state,
                 country,
                 zip,
                 bank_ident_num,
                 addtl_info
            FROM TB_XOP_WIRE_INSTRUCTIONS
           WHERE wire_seq_no = in_wire_seq_no
           UNION
           SELECT ml_brok_acct_num,
                 ssn,
                 plan_num,
                 instr_type,
                 aba_routing_num,
                 swift_routing_code,
                 bank_name,
                 bank_acct_num,
                 name_on_account,
                 bank_addr_1,
                 bank_addr_2,
                 bank_addr_3,
                 city,
                 state,
                 country,
                 zip,
                 bank_ident_num,
                 addtl_info
            FROM TB_XOP_WIRE_INSTRUCTIONS_AUDIT
           WHERE wire_seq_no = in_wire_seq_no;
    CURSOR c_order_qty IS
    SELECT order_qty
    FROM tb_xop_order_manager
    WHERE voucher_num = p_voucher_num;
    v_order_qty     tb_xop_order_manager.order_qty%TYPE;
    v_wire_instruction             c_wire_instruction%ROWTYPE;
    v_order_dtls      get_order_dtls%rowtype;
    v_opt_dtls        get_opt_dtls%rowtype;
    v_settle_dt       tb_ml_exer_upload.settle_dt%type;
    v_cusip_num       corp.cusip_num%type;
    v_err_cd          number(12):=0;
    v_err_msg         varchar2(4000);
    v_compy_nme       tb_fc_Compy.compy_nme%type;
    v_ml_sec_num      tb_fc_compy.ml_sec_num%type;
    v_mail_cd         xop_optionee.mail_cd%type;
    v_count1            PLS_INTEGER := 0;
    v_sum_activity_qty  tb_xop_order_manager_t.activity_qty%TYPE;
    v_transact_no       PLS_INTEGER;
    v_ivr_plan_num      tb_fc_compy.ivr_plan_num%TYPE;
    wait_for_more       EXCEPTION;
    exceeds_order_qty   EXCEPTION;
    --Added for CQ# PCTUP00481233
    v_sub_totfee number;
    v_sub_fixedfee1 number;
    v_sub_fixedfee2 number;
    v_sub_fixedfee3 number;
    v_sub_secfee number;
    v_sub_feenum number;
    --Added for CQ# PCTUP00481233
    v_fixedfee1 tb_xop_order_manager_t.fixed_fee1%TYPE; --SPIF# 43161- variable to hold fixed fee1
    BEGIN
        OPEN c_order_qty;
        FETCH c_order_qty INTO v_order_qty;
        CLOSE c_order_qty;
        dbms.output.put_line('completed1');
        IF v_order_qty <> p_activity_qty THEN
          dbms.output.put_line('completed2');
            IF p_status_type = 'EO' AND v_order_qty < p_activity_qty THEN
                RAISE exceeds_order_qty;
                  dbms.output.put_line('completed3');
            ELSIF p_status_type = 'EO' AND v_order_qty > p_activity_qty THEN
                -- Partial Execution
                INSERT INTO tb_xop_hold_multi_orders
                    ( voucher_num
                    , reference_key
                    , seq_num
                    , return_code
                    , reason_desc
                    , status_type
                    , activity_qty
                    , leaves_qty
                    , exec_price
                    , current_status
                    , waiting
                    ,activ_dt )
                VALUES
                    ( p_voucher_num
                    , p_reference_key
                    , p_seq_num
                    , p_return_code
                    , p_reason_desc
                    , p_status_type
                    , p_activity_qty
                    , p_leaves_qty
                    , p_exec_price
                    , p_current_status
                    , 'Y'
                    ,SYSTIMESTAMP );
                      dbms.output.put_line('completed4');
            ELSE
                IF p_status_type = 'BE' THEN
                    SELECT COUNT(1) INTO v_count1
                    FROM tb_xop_hold_multi_orders
                    WHERE voucher_num = p_voucher_num;
                      dbms.output.put_line('completed5');
                    IF v_count1 > 0 THEN
                        INSERT INTO tb_xop_hold_multi_orders
                            ( voucher_num
                            , reference_key
                            , seq_num
                            , return_code
                            , reason_desc
                            , status_type
                            , activity_qty
                            , leaves_qty
                            , exec_price
                            , current_status
                            , waiting
                            ,activ_dt)
                        VALUES
                            ( p_voucher_num
                            , p_reference_key
                            , p_seq_num
                            , p_return_code
                            , p_reason_desc
                            , p_status_type
                            , (-1) * p_activity_qty
                            , p_leaves_qty
                            , p_exec_price
                            , p_current_status
                            , 'Y'
                            ,SYSTIMESTAMP );
                        UPDATE tb_xop_hold_multi_orders
                        SET waiting = 'Y'
                        WHERE voucher_num = p_voucher_num;
                          dbms.output.put_line('completed6');
                    END IF;
                END IF;
            END IF;
              dbms.output.put_line('completed7');
            SELECT SUM(NVL(activity_qty,0)) INTO v_sum_activity_qty
            FROM tb_xop_hold_multi_orders
            WHERE waiting = 'Y'
            AND voucher_num = p_voucher_num;
            IF v_sum_activity_qty > 0 THEN
                IF v_sum_activity_qty <> v_order_qty THEN
                    RAISE wait_for_more;
                ELSE
                    -- final order in the partial execution; complete the process
                    UPDATE tb_xop_hold_multi_orders
                    SET waiting = 'N'
                        , process_dt = SYSDATE
                    WHERE voucher_num = p_voucher_num;
                END IF;
            END IF;
        END IF;
        UPDATE tb_xop_order_manager_t
        SET activ_dt = TO_CHAR( SYSDATE, 'YYYY-MM-DD HH24:MI:SS' ) || '.000'
            , dest = p_dest
            , reference_key = p_reference_key
            , seq_num = p_seq_num
            , return_code = p_return_code
            , reason_desc = p_reason_desc
            , status_type = p_status_type
            , activity_qty = v_order_qty --p_activity_qty
            , leaves_qty = 0 --p_leaves_qty
            , exec_price = p_exec_price
        WHERE voucher_num = p_voucher_num;
        dbms.output.put_line('completed8');
         * SPIF# 43161- Update of current status to PO moved at the end, same as how PROD works.
    IF (p_status_type = 'EO') THEN
      BEGIN
        select cusip_num
          into   v_cusip_num
          from   corp;
      EXCEPTION
          WHEN NO_DATA_FOUND THEN
              SELECT cusip_num
                INTO v_cusip_num
                FROM tb_xop_espp_compy
               WHERE compy_acronym = replace(replace(user,'CMS'),'_USER');
          WHEN OTHERS THEN
              NULL;
      END;
       select compy_nme,ml_sec_num, ivr_plan_num
       into   v_compy_nme,v_ml_sec_num, v_ivr_plan_num
       from   tb_fc_compy
       where compy_acronym = replace(replace(user,'CMS'),'_USER')
       UNION ALL
       select compy_nme, je_ml_security_number, ivr_plan_num
       from tb_xop_espp_compy
       where compy_acronym = replace(replace(user,'CMS'),'_USER');
    --   where  ivr_plan_num = replace(substr(p_voucher_num,1,7),'SSO','XOP');
      open get_order_dtls(p_voucher_num);
      FETCH get_order_dtls INTO v_order_dtls;
       v_settle_dt := fn_xop_bankopen_bizday(TRUNC(v_order_dtls.exer_date + 1));
       v_settle_dt := fn_xop_bankopen_bizday(TRUNC(v_settle_dt + 1));
       v_settle_dt := fn_xop_bankopen_bizday(TRUNC(v_settle_dt + 1));
       FOR c_mail_cd IN get_mail_cd(v_order_dtls.opt_num)
       LOOP
         v_mail_cd := c_mail_cd.mail_cd;
         -- Do we need to get sp_mail_cd and overlay with the sp_mail_cd in order_manager_t???
       END LOOP;
       OPEN get_opt_dtls(v_order_dtls.opt_num);
       FETCH get_opt_dtls INTO v_opt_dtls;
       CLOSE get_opt_dtls;
      v_fixedfee1 := nvl(v_order_dtls.fixed_fee1, 0);
       * SPIF# 43161- atleast one handling fee per day of transaction
      v_fixedfee1 := pk_xop_enh_exerupdate.chrg_tranxfixed_fee(v_fixedfee1,
                                                               v_order_dtls.symbol,
                                                               v_order_dtls.corp_acronym,
                                                               v_order_dtls.opt_num);
      --Insert into tb_ml_exer_upload
      --Added for CQ# PCTUP00481233
       Pk_Xop_Transactmodel.GET_FEE(v_order_dtls.GROUP_ID,v_order_dtls.SVC_ID,'SQ',v_order_dtls.opts_exer,
                                    round(v_order_dtls.exec_price, 4),v_sub_totfee,v_sub_fixedfee2,v_sub_fixedfee1,
                                    v_sub_fixedfee3,v_sub_secfee,v_sub_feenum,lpad(v_order_dtls.ssn,9,0));
       v_order_dtls.sec_fee:=v_sub_secfee;
       UPDATE tb_xop_order_manager_t
        SET sec_fee=v_sub_secfee
        WHERE voucher_num = p_voucher_num;
        dbms.output.put_line('completed8');
      --- End CQ # PCTUP00481233
      INSERT INTO tb_ml_exer_upload
                            (exer_num,exer_seq,
                             exer_dt, written_flag, backout_flag, output_line,
                             je_flag, opts_exer,
                             tot_tax,shrs_sold,comm_value,tot_fee,
                             mkt_prc,exer_type, soc_sec,
                             name_first, name_mi,
                             name_last,check_addr_1,check_addr_2,check_addr_3,
                             check_addr_4,check_addr_5,city,state,zip,country,
                             city_state_zip_country,
                             p_name,opt_addr1,opt_addr2,opt_addr3,opt_addr4,
                             opt_addr5,opt_addr6,
                             settle_dt,send_to_citibank_flag,
                             dom_chek_distr,foreign_currency_code,
                             distribution_method,wire_seq_no,
                             cusip_num, ml_retail_account,multi_curr_handling_fee,
                             ml_sec_num, corp_name,upd_optionee_addr,
                             outbound_flag, -- make it N
                             corp_symbol,taxwire_approve, -- make it not applicaplabe
                             exersource,
                             mail_cd, sp_mail_cd,
                             backup_withholding,
                             user_id,
                             acct_num_othr)
       VALUES(v_order_dtls.exer_num,0,v_order_dtls.exer_date,'N','N',NULL,
    -- PG 12/12/05 Changed to populate the je_flag based on dom_chek_distr         'D',
    -- PG 12/16/05 JE should not be generated for international checks.. So 'Y' always
              'Y', --je_flag
              v_order_dtls.opts_exer,0,--total tax will be 0.
              v_order_dtls.opts_exer, --shrs_sold,
              v_order_dtls.comm_value,
              --SPIF# 43161- replaced nvl(v_order_dtls.fixed_fee1, 0) with v_fixedfee1
              v_fixedfee1 + nvl(v_order_dtls.fixed_fee3,0) + nvl(v_order_dtls.sec_fee,0), --v_order_dtls.fees_amt,
              round(v_order_dtls.exec_price, 4),v_order_dtls.exer_type,
              LPAD(v_order_dtls.ssn,9,'0'), --v_order_dtls.ssn, Modified by Suresh on 02/08/07 for SPIF # 37210
              v_order_dtls.name_first,v_order_dtls.name_mi,v_order_dtls.name_last,
              v_order_dtls.check_addr_1,v_order_dtls.check_addr_2,v_order_dtls.check_addr_3,
              v_order_dtls.check_addr_4,v_order_dtls.check_addr_5,nvl(v_order_dtls.city,v_opt_dtls.city),
              nvl(v_order_dtls.state,v_opt_dtls.state),nvl(v_order_dtls.zip,v_opt_dtls.zip),
              nvl(v_order_dtls.country,v_opt_dtls.country),
              SUBSTR(nvl(v_order_dtls.city||v_order_dtls.state||v_order_dtls.zip||v_order_dtls.country,
                  v_opt_dtls.city_state_zip_country),1,34), -- COLUMN LENGTH MAX IS 35
              v_opt_dtls.p_name,v_opt_dtls.opt_addr1,v_opt_dtls.opt_addr2,v_opt_dtls.opt_addr3,
              v_opt_dtls.opt_addr4,v_opt_dtls.opt_addr5,v_opt_dtls.opt_addr6,
              v_settle_dt,decode(v_order_dtls.distribution_method,'W','Y','D','Y','C','Y','D'),
              v_order_dtls.dom_chek_distr,v_order_dtls.foreign_currency_code,
              v_order_dtls.distribution_method,v_order_dtls.wire_seq_no,
              v_cusip_num,v_order_dtls.acct_num,v_order_dtls.multi_curr_handling_fee,
    --          nvl(fn_get_sec_num(replace(substr(p_voucher_num,1,7),'SSO','XOP'),v_order_dtls.symbol),v_ml_sec_num),
              nvl(fn_get_sec_num(v_ivr_plan_num, v_order_dtls.symbol),v_ml_sec_num),
              v_compy_nme,v_order_dtls.upd_optionee_addr,
              'N', --'N' is for outbound flag.
              v_order_dtls.symbol,'D', --'D' for taxwires disabled
              'S', -- 'S' for source being subsequent sale.
              v_mail_cd,  --need to get mail_Cd??
              v_order_dtls.sp_mail_cd,v_order_dtls.backup_withholding,
              user,v_order_dtls.acct_num_othr);
    IF (NVL(v_order_dtls.wire_seq_no,0) > 0) THEN
       OPEN c_wire_instruction(v_order_dtls.wire_seq_no);
       FETCH c_wire_instruction INTO v_wire_instruction;
       CLOSE c_wire_instruction;
      INSERT INTO TB_XOP_TRANSACT_WIRE_INSTR
                           (user_id, exer_num, wire_seq_no, ml_brok_acct_num, ssn,
                            plan_num, instr_type, aba_routing_num,
                            swift_routing_code, bank_name, bank_acct_num,
                            name_on_account, bank_addr_1, bank_addr_2, bank_addr_3,
                            city, state, country, zip, bank_ident_num, addtl_info )
                        VALUES
                           (USER,v_order_dtls.exer_num, v_order_dtls.wire_seq_no,
                            v_wire_instruction.ml_brok_acct_num, v_wire_instruction.ssn,
                            v_wire_instruction.plan_num, v_wire_instruction.instr_type, v_wire_instruction.aba_routing_num,
                            v_wire_instruction.swift_routing_code, v_wire_instruction.bank_name, v_wire_instruction.bank_acct_num,
                            v_wire_instruction.name_on_account, v_wire_instruction.bank_addr_1, v_wire_instruction.bank_addr_2,
                            v_wire_instruction.bank_addr_3, v_wire_instruction.city, v_wire_instruction.state, v_wire_instruction.country, v_wire_instruction.zip,
                             v_wire_instruction.bank_ident_num, v_wire_instruction.addtl_info);
            dbms.output.put_line('completed10');
    END IF;
    /* PG 01/05/06 Call the check conversion only for international checks and wires */
    IF v_order_dtls.dom_chek_distr = 'N' AND v_order_dtls.distribution_method IN ('W', 'D', 'C') THEN
        /* PG 12/20/05 To process subsequent sales with wire or foreign currency distribution */
         v_transact_no := 88;
         pk_xop_citibank_forex.pr_cashconversion_ins_request( v_order_dtls.acct_num
                                                              , LPAD(v_order_dtls.ssn,9,'0') --v_order_dtls.ssn, Modified by Suresh on 02/15/07 for SPIF # 37210
                                                              , v_order_dtls.distribution_method
                                                              , v_order_dtls.foreign_currency_code
                                                              , v_order_dtls.wire_seq_no
                                                              , ROUND((v_order_dtls.opts_exer * round(v_order_dtls.exec_price, 4)),2)
                                                                - ROUND(v_order_dtls.comm_value,2)
                                                                - ROUND(nvl(v_order_dtls.fixed_fee1,0) + nvl(v_order_dtls.fixed_fee3,0) + nvl(v_order_dtls.sec_fee,0),2)
                                                                - nvl(v_order_dtls.multi_curr_handling_fee,0)
                                                                - nvl(v_order_dtls.backup_withholding,0) -- net proceeds
                                                              , v_order_dtls.multi_curr_handling_fee --handling fee
                    --Modified by Bhaskar/Suresh on 03/02/2006    --, v_order_dtls.login_name
                                                              , CASE v_order_dtls.login_name WHEN 'CLIENT/' THEN v_order_dtls.login_name||'SSO' ELSE v_order_dtls.login_name||'/SSO' END
                                                              , v_transact_no -- transact_no as place holder for exer_type 88
                                                              , v_order_dtls.check_addr_1
                                                              , v_order_dtls.check_addr_2
                                                              , v_order_dtls.check_addr_3
                                                              , v_order_dtls.check_addr_4
                                                              , v_order_dtls.upd_optionee_addr
                                                              , v_order_dtls.city
                                                              , v_order_dtls.state
                                                              , v_order_dtls.zip
                                                              , v_order_dtls.country
                                                              , v_order_dtls.login_ipaddress
                                                              , v_order_dtls.fcnum
                                                              , v_order_dtls.opt_num
                                                              , v_settle_dt,
                                                              p_exer_num => v_order_dtls.exer_num
    END IF;
    COMMIT;
    close get_order_dtls;
    END IF;
      * SPIF# 43161- Update to current status into PO is moved to this part, same as PROD.
    UPDATE tb_xop_order_manager_t
    SET exec_dttime = decode(p_status_type,'EO',to_char(sysdate,'DD-MON-YYYY HH24:mi:ss'),null)
         , exer_date  = TRUNC(SYSDATE)
         , cancel_dttime = decode(p_status_type,'CX',to_char(sysdate,'DD-MON-YYYY HH24:mi:ss'),'UR',to_char(sysdate,'DD-MON-YYYY HH24:mi:ss'),null)
         , current_status = 'PO'
         , sum_status = decode(p_status_type,'EO','X','C')
         , sum_stat_dttime = SYSDATE
    WHERE voucher_num = p_voucher_num;
          v_err_cd := sqlcode;
          v_err_msg := sqlerrm;
          open p_err_cur for select v_err_cd err_code,v_err_msg err_msg from dual;
    EXCEPTION
            dbms.output.put_line('completed200');
    /* PG 02/10 handled 'partial fill order' exception */
      when wait_for_more then
          v_err_cd := 0;
          v_err_msg := 'ORA-0000: normal, successful completion';
          pr_xop_log_errors('Partially filled; Waiting for more - Activity qty:' || to_char(v_sum_activity_qty)|| ' pk_xop_subsales.pr_process_exer');
          open p_err_cur for select v_err_cd err_code,v_err_msg err_msg from dual;
      when exceeds_order_qty then
          v_err_cd := sqlcode;
          v_err_msg := sqlerrm;
          open p_err_cur for select v_err_cd err_code,v_err_msg err_msg from dual;
          pr_xop_log_errors('Activity quantity exceeded the Order_qty - Activity qty: ' || to_char(p_activity_qty) || ' pk_xop_subsales.pr_process_exer');
      when others then
          v_err_cd := sqlcode;
          v_err_msg := sqlerrm;
          open p_err_cur for select v_err_cd err_code,v_err_msg err_msg from dual;
          pr_xop_log_errors('ErrorCode '||SQLCODE||' with ErrorMessage as '||SQLERRM||' has occured for '||user||'pk_xop_subsales.pr_process_exer');
                dbms.output.put_line('completed125');
    END pr_process_exer;
    Hi friends, any1 help me out how to define the ref-cursor in declaration section, and how to find at what situation the constraint error occurred..

    956684 wrote:
    Hi,.
    Friends plz help me out ..how to debug and find the exact position of the constraint violation..thank you for the help..There isn't a way to trace it unless you have caught the exception raised.
    As a way to start the debug, you will have to monitor
    1. All DML's against the Table on which you have constraint. More specifically, the DML's that act on the column you have constraint on.
    2. Use Exception Handling, to log the Error and the data that causes the constraint to fail.
    3. Do not forget to monitor the Triggers, if they are used, that would write some data into the column you have constraint on.
    Or
    Another way to trace is:
    select *
      from user_source
    where lower(text) like '%your_table_name%';
    order by type, name, line;Look at the lines, exclude that are in Declaration or in SELECT statements and target the DML's.
    Looking at the un-formatted code you posted, this statement looks like a culprit.
    INSERT INTO tb_ml_exer_upload
    (exer_num,exer_seq,
    exer_dt, written_flag, backout_flag, output_line,
    je_flag, opts_exer,
    tot_tax,shrs_sold,comm_value,tot_fee,
    mkt_prc,exer_type, soc_sec,
    name_first, name_mi,
    name_last,check_addr_1,check_addr_2,check_addr_3,
    check_addr_4,check_addr_5,city,state,zip,country,
    city_state_zip_country,
    p_name,opt_addr1,opt_addr2,opt_addr3,opt_addr4,
    opt_addr5,opt_addr6,
    settle_dt,send_to_citibank_flag,
    dom_chek_distr,foreign_currency_code,
    distribution_method,wire_seq_no,
    cusip_num, ml_retail_account,multi_curr_handling_fee,
    ml_sec_num, corp_name,upd_optionee_addr,
    outbound_flag, -- make it N
    corp_symbol,taxwire_approve, -- make it not applicaplabe
    exersource,
    mail_cd, sp_mail_cd,
    backup_withholding,
    user_id,
    acct_num_othr)
    VALUES(v_order_dtls.exer_num,0,v_order_dtls.exer_date,'N','N',NULL,
    -- PG 12/12/05 Changed to populate the je_flag based on dom_chek_distr 'D',
    -- PG 12/16/05 JE should not be generated for international checks.. So 'Y' always
    'Y', --je_flag
    v_order_dtls.opts_exer,0,--total tax will be 0.
    v_order_dtls.opts_exer, --shrs_sold,
    v_order_dtls.comm_value,
    --SPIF# 43161- replaced nvl(v_order_dtls.fixed_fee1, 0) with v_fixedfee1
    v_fixedfee1 + nvl(v_order_dtls.fixed_fee3,0) + nvl(v_order_dtls.sec_fee,0), --v_order_dtls.fees_amt,
    round(v_order_dtls.exec_price, 4),v_order_dtls.exer_type,
    LPAD(v_order_dtls.ssn,9,'0'), --v_order_dtls.ssn, Modified by Suresh on 02/08/07 for SPIF # 37210
    v_order_dtls.name_first,v_order_dtls.name_mi,v_order_dtls.name_last,
    v_order_dtls.check_addr_1,v_order_dtls.check_addr_2,v_order_dtls.check_addr_3,
    v_order_dtls.check_addr_4,v_order_dtls.check_addr_5,nvl(v_order_dtls.city,v_opt_dtls.city),
    nvl(v_order_dtls.state,v_opt_dtls.state),nvl(v_order_dtls.zip,v_opt_dtls.zip),
    nvl(v_order_dtls.country,v_opt_dtls.country),
    SUBSTR(nvl(v_order_dtls.city||v_order_dtls.state||v_order_dtls.zip||v_order_dtls.country,
    v_opt_dtls.city_state_zip_country),1,34), -- COLUMN LENGTH MAX IS 35
    v_opt_dtls.p_name,v_opt_dtls.opt_addr1,v_opt_dtls.opt_addr2,v_opt_dtls.opt_addr3,
    v_opt_dtls.opt_addr4,v_opt_dtls.opt_addr5,v_opt_dtls.opt_addr6,
    v_settle_dt,decode(v_order_dtls.distribution_method,'W','Y','D','Y','C','Y','D'),
    v_order_dtls.dom_chek_distr,v_order_dtls.foreign_currency_code,
    v_order_dtls.distribution_method,v_order_dtls.wire_seq_no,
    v_cusip_num,v_order_dtls.acct_num,v_order_dtls.multi_curr_handling_fee,
    -- nvl(fn_get_sec_num(replace(substr(p_voucher_num,1,7),'SSO','XOP'),v_order_dtls.symbol),v_ml_sec_num),
    nvl(fn_get_sec_num(v_ivr_plan_num, v_order_dtls.symbol),v_ml_sec_num),
    v_compy_nme,v_order_dtls.upd_optionee_addr,
    'N', --'N' is for outbound flag.
    v_order_dtls.symbol,'D', --'D' for taxwires disabled
    'S', -- 'S' for source being subsequent sale.
    v_mail_cd, --need to get mail_Cd??
    v_order_dtls.sp_mail_cd,v_order_dtls.backup_withholding,
    user,v_order_dtls.acct_num_othr);What is the Table structure of tb_ml_exer_upload and what columns do you have constraints on?
    Which column of the table tb_ml_exer_upload is your Primary Key (because constraint name mentions pk_tb_ml_exer_upload)?
    Edited by: Purvesh K on Jan 4, 2013 12:57 PM

  • Dml error logging  - are exceptions redundant?

    Hi there
    Heard alot about dml error logging and looks good in practice.
    In a data warehouse environment and wish to make use of this in a pl/sql procedure - I'm thinking is the only exception I would neeed know something like
    when others
    then
    insert into error_table values(sqlcodes,sqlerrm);commit;
    raise;
    Another question as purely a background routine with no user interaction do we really need the raise - I know many posts talk about having ir or raise_application_error to alert user something went wrong but in purely batch procedures is this really necessary?
    Also what is the error_stack exactly and how can you query it?
    Any advice/thoughts?
    Many Thanks

    other question as purely a background routine with no
    user interaction do we really need the raise - I know
    many posts talk about having ir or
    raise_application_error to alert user something went
    wrong but in purely batch procedures is this really
    necessary?RAISE:
    there a discussion going on this issue:
    WHAT is the purpose of RAISE in an EXCEPTION clause ?
    RAISE_APPLICATION_ERROR
    this will report an error and will break out. Usually used to report errors while debugging.
    Regards

  • Automatic Row Processing (DML) process is not updating the record

    Hi all,
    I have an application which was working fine last week and tested and backuped to new application. This Monday, one of the form in that application is not updating the data all of a sudden. I debug that by having page 0 variable and assign the value from the column variable to page 0 variable. Whatever value I changed to the column variable was getting updated to page 0 variable. But it is not updated in the database. So, I changed the success message of the "Automatic Row Processing (DML) process" and I can see the success message on the page, but the column value does not get updated. But when I go back and checked my backup application, that page is working fine. For now, I copy that from the backup application, but I would like to know why this is happening?
    Thanks
    SHY

    Hi Scott,
    Thank you very much for your response. Because of the database complexity, I can't create/import the application on the apex.oracle.com. I am just wondering why this is happening. One of my coworker said same thing happened to her in one of her project and it gets resolved once she restart the server. I am not able to restart the server to check and see if this resolved as the application is on the client server. Do we need to clean up any log file? Thanks.
    SHY

  • Is it possible to see DML generated by Applying the LCR?

    We've got a fairly strange situation happening at one of our client sites. Our system includes triggers on the target/replica tables, to track changes for incremental refresh purposes. Been working great (mostly) for years with Streams. However, recently some logic was added to the triggers to NOT record changes if a specific column on the table is being UPDATEd (due to aa source application change), so in the UPDATE section of the trigger, the UPDATING('<COLUMN_NAME'>) function is used to determine if that column is actually being updated or not. THis works because in the source application, this column ONLY evre gets updated during one single process that we DO actually want to ignore. Again, this logic worked great internally as well at almost all client sites. However, at one client, this logic is NOT working, which is leading to the theory that for some reason, when applying the actual LCR to the table, STreams is firing off an UPDATE statement that is updating ALL columns, regardless of whether the values changed or not. Whereas in most situations, the evidence suggests that Streams only puts those columns in the SET clause of the UDPATE statement that are in fact different/changed.
    So - this then begs the question: is there some way to "see" the UPDATE statement generated by Streams when applying the LCR? We've been able to look at the actual LCR contents (all the OLD and NEW values) and so can see that this value is in fact, NOT changing. Yet the UPDATING logic in the trigger seems to indicate that it is still being included in the SET clause for some reason...
    Have tried adding logic to the trigger itself to look at v$SQL, etc to see the actual UDPATE statement but that doesn't seem to be working. Any other tips for debuging this one?
    This is 11.2.0.2 - alternatively: any known Streams bugs w/ this release that we need to look for patches for that might address this?
    Thanks for any/all ideas.
    Cheers,
    Jim

    Yes you can see the DML executed by the apply servers. This is documented here:
    http://docs.oracle.com/cd/E11882_01/server.112/e17069/strms_trapply.htm#STRMS1062
    Regards,

  • DML Process Row Error

    I have a data-entry page that I created using the Page with Form component wizard. It is suddenly not working. As far as I can tell is that it started after I changed the process Success message in the 'Process Row of ...' process that was automatically created when I created the page. I have duplicated the error on another page by changing the process Success message and saving.
    The table is in a schema outside of the HTMLDB schema. When I created the page I chose the schema name and table. However when I look at the process, it is showing a different schema for the owner. When I look at the debug statements, the page is erroring out after
    0.10: ...DML_PROCESS_ROW (AFTER_SUBMIT) #OWNER#:TPM_PROJECTS:P30_PROJECT_ID:PROJECT_ID|IU
    before the error started, it was processing this as:
    0.10: ...DML_PROCESS_ROW (AFTER_SUBMIT)
    XXTPM:TPM_PROJECTS:P30_PROJECT_ID:PROJECT_ID|IU
    In the Owner drop-down for this process, it only shows MARVEL schema so I cannot change it to my schema. Is there any way to fix the error? For the time, I'm going to make my own process, but I wondered if this was the correct behavior....
    I'm in 1.6 and the error I receive after making the Success message change to the process is:
    ORA-20001: Error in DML: p_rowid=17, p_alt_rowid=PROJECT_ID, p_rowid2=, p_alt_rowid2=. ORA-06550: line 1, column 17: PL/SQL: ORA-00936: missing expression ORA-06550: line 1, column 9: PL/SQL: SQL Statement ignored
    Thanks, Janel

    Janel,
    Sounds like you have a schema named MARVEL that you are using as your application's parsing schema but your app also references objects in other schemas. Note that MARVEL is not the HTML DB schema, it's all yours. In 1.6.1, we fixed some problems related to the symptoms you described. I suggest that you apply that patch and recreate any processes that reference objects outside the application's parsing schema.
    Scott

  • How to debug flash player crashes?

    Hello there
    I'm building this game with flash...when I test and debug my
    project from flash it works fine but when playing the game in a
    browser, it crashes very often...after a couple seconds/minutes of
    play. I installed the latest flash player and tried on a couple
    computers with no luck...so how can I know what's crashing? or how
    can I have more info on why it crashes? what kind of debug tool can
    I use when flash player crashes within the browser. it's really
    hard to know what the problem is.
    Thanks for the answers if any :)
    Marco

    Browser crashes caused by the Flash Player is the stuff of
    nightmares, it's nearly impossible to debug. In fact, I think
    kglads advice about flashtracer is the best news I've seen on the
    subject (I didn't know about flashtracer -- thanks kglad).
    What player build do you have in IE? What is it in FireFox?
    You can check the exact build here:
    http://www.macromedia.com/software/flash/about/
    Can you provide a link to the crashing SWF? Does it crash
    both IE and FF?

  • HTML DB - DML error

    Hi everybody,
    I have a DML PROCESS and a message is appearing:
    Error The process "PRC_ENREGISTRER_R2_STRATEGIE_INTERV_AUTO" has not been a success
    OK
    ORA-06550: line 1, column 112: PL/SQL: ORA-01741: illegal zero-length identifier ORA-06550: line 1, column 7: PL/SQL: SQL Statement ignored
    How can I see this line 1 column 112, in the debug mode ????
    Thanks. Bye.

    Thank you Mr. Spadafore,
    What is the best way to trace the session to see where it's failing ? Is it to be the debugging mode ?
    Today, with the DBA, we try TKPROF utility; there is a lot of stuff, it seems to be more interesting to the DBA because it offers different statistics about CPU use..................
    The debugging is it better with 2.0 ? There is not tool to use with HTML-DB to DEBUG or TRACE our code ?
    The debugging is it more develop with Forms or Jdeveloper ?
    Thanks. Bye.

  • Debug an Applet ? How ?

    I probably cant see the wood for the trees, but no mater how hard I try, I cannot debug an applet class. Whenever I right-click and run I get
    init:
    deps-jar:
    compile-single:
    run-applet:
    Warning: <param name=... value=...> tag requires name attribute.
    Warning: <param name=... value=...> tag requires name attribute.
    Warning: <param name=... value=...> tag requires name attribute.
    Warning: <param name=... value=...> tag requires name attribute.
    BUILD SUCCESSFUL (total time: 0 seconds)
    I have followed the help guide and have the html file in the src directory. I can run the html file ok in a normal browser. but for the life of me I cannot see where or how to either attach the debugger to the applet process, or even run it and hit a breakpoint.
    I canot run it like a normal application as there is no "Main Class" and trying to set that up is a nightmare in itself. I have only just started using the IDE and although it has similarities with .NET (hope thats not a bad word here) it does seem to be a lot more complex when youre trying to recall everything you forgot from years ago.
    Can anyone explain is an easy straight foward basic language what I need to do ? I find the help files assume that one already has a vast amount of background. The learning curve for me is very steep at the moment.
    Thanks for your time and help.
    Kess

    Quote:
    Copy the MyApplet.html launcher file from the build folder to the package where the applet class lives in the src folder (in this case, to org.me.hello). Make sure that the MyApplet.html launcher file has the same name as the applet class.
    Note that later it says....
    Note that applets run in the virtual machine of the IDE's default web browser. The IDE uses a different virtual machine and therefore applets are not included in a web application's debug session. Debug the applet within the Java project, as explained above.
    So, if you create the htm file and add in some parameters, it becomes a web application and the caveat is that no breakpoints can be set and you cant step into the code.
    Which is the problem I am having.
    Of course none of the examples or help pages only ever give the most simplest of the "Hello Word" examples, and it would appear that doing something a little more complex is beyond the help articles.......
    I am still stuck, and would much prefer someone to state excatly how to debug an applet.....
    I cant believe this beyond some of the experts here.
    Thanks for your comments so far.

Maybe you are looking for

  • Installation APEX for Database 10.1.0.4.2 error

    Hi I installed the Oracle Database 10g (10.1.0.4.2) into my Windows XP Professional. I'm now trying to install the APEX version 2.2.1, but I'm getting the following error when I run the installation package from SQL*Plus Release 10.1.0.4.2: SQL> @F:\

  • Table of contents isn't showing the paragraph style I've set it up with

    I've made a table of contents in my document, and I've set up a character style called TOC body text, which has settings as belowL However when I click OK to create the TOC, the text comes out in all caps size 24, like this: This is the same as the s

  • Email Activation

    Hi I am trying to work out how to achieve the following: I have a registration page and all works great and the user receives an email to activate their account. The {kt_login_user} in the include displays the Username in the email the sent to the pe

  • App store categories

    How can I change the category in the app store from games to productivity?  In the app store clicking the lower categories button takes me to games, and there is no list to select another category.  The upper left button only allows for game subcateg

  • Save multiple galleries

    I want to know if there is a way to save the state of an app e.g. Save all of the currently loaded collections into one single file and then later load that file. If not, is this going to be possible in future editions of Siena?