2 Replies Latest reply on Apr 15, 2011 2:06 AM by 720456

    Exception "ORA-06531" is raised out when calling DBMS_WM.MergeTable

      Recently in my project, we have the requirement of creating workspace, do modification in this workspace and at last merge all selected changed back to original dataset ( "LIVE" workspace ). The OWM version we are using is "" together with Oracle version "Oracle Database 10g Enterprise Edition Release - Prod".

      The 11 tables we placed in the workspace manager are all in 3NF and have FK defined, with top level table refering to tables that are not in OWM. All workspaces' parent are LIVE. It works fine for normal modification in workspace. However, we encounter one weird issue when calling OWM built-in API DBMS_WM.MergeTable to merge selected data into LIVE workspace by specifiying the where_clause parameter by "id = xxx".

      The expected merge process is:
      1. User select data through UI;
      2. DB codes call DBMS_WM.MergeTable for selected data one table by one table and one row by one row.

      We are now blocked since we sometimes got the one exception saying

      +"ORA-06531: Reference to uninitialized collection+
      ORA-06512: at "WMSYS.LT", line 7203".*

      This exception happens in a random way. Sometimes it happens and the other time does not, even if I call the same API with the same parameter ( of course, after each call, I rollbacked the merge ).

      My first guess is the merge has something to do with the table order. Then I tried merge either parent first or child first, this issue remains. In both test, I just call DBMS_WM.MergeTable directly, no additional codes involved. More strange thing is: in the Test 1, I merged child table prior to parent table, which errors out with above exception. Then in the Test 2, I merged parent table prior to child table. In this time, it works. Then I rollbacked the merge operation and try Test 1 again. To my suprise, it works.

      I then google the internet, no thread describes this issue. Is there anything wrong with my environment or implementation? Please advise.

      Thanks in advance

      Edited by: user5736610 on 2011-4-14 上午2:12

      Edited by: user5736610 on 2011-4-14 上午2:16