3 Replies Latest reply on Jan 18, 2012 11:24 AM by 690485

    Error while enabling versioning for the second time

      Hi all,

      I have encountered an issue with the version enabled schema. I have followed below steps.

      1. Created a schema (HR) with two table viz, emp and dept
      2. Enabled versioning using below code

      dbms_wm.EnableVersioning('emp', 'VIEW_WO_OVERWRITE');
      dbms_wm.EnableVersioning('dept', 'VIEW_WO_OVERWRITE');

      3. I had to drop the schema (HR)
      4. Created the same HR schema and followed step 2 to enable versioning.
      5. Below is the error.

      Error starting at line 1 in command:
      dbms_wm.EnableVersioning('emp', 'VIEW_WO_OVERWRITE');
      dbms_wm.EnableVersioning('dept', 'VIEW_WO_OVERWRITE');
      Error report:
      ORA-20131: table 'LTDEMO.EMP' is already version enabled
      ORA-06512: at "WMSYS.LT", line 9150
      ORA-06512: at line 2

      From the above error one can imagine that there are few residues left in WMSYS related to the dropped HR schema. I can recreate HR schema with different name say HR1 and follow the next actions but I would like to repair the existing stuff. Could you please guide me to remove all the residues and repair the existing stuff please.

      Please let me know if further information is required.