5 Replies Latest reply: Jan 19, 2012 1:51 PM by Ben Speckhard-Oracle RSS

    Identifying the conflicted data in conflicted workspace

    690485
      Hi all,

      Im using Oracle 11g and version enabled schema. After merging workSpace_1, when I merge a WorkSpace_2 to LIVE workspace, I found a conflict error and below was the error information.

      Error starting at line 30 in command:
      EXECUTE DBMS_WM.MergeWorkspace('WorkSpace_2')
      Error report:
      ORA-20055: conflicts detected for workspace: 'WorkSpace_2' in table: 'COUNTY.WATER_BODIES'
      ORA-06512: at "WMSYS.LT", line 6028
      ORA-06512: at line 1

      Here, I am interested in listing out all the rows and columns which were conflicted in conflicted workspace. Can anyone provide me the SQL statements which lists out all the conflicted data in conflicted workspace.

      Please let us know if further information required.

      Regards,
      Kumar

      Edited by: Kumar on Jan 17, 2012 10:01 AM
        • 1. Re: Identifying the conflicted data in conflicted workspace
          Ben Speckhard-Oracle
          Hi Kumar,

          To identify the conflicts you could do the following:

          SQL> exec dbms_wm.SetConflictWorkspace('WorkSpace_2') ;
          SQL> select * from COUNTY.WATER_BODIES_CONF ;

          The additional columns included in the _CONF view are described in the user manual.

          Regards,
          Ben
          • 2. Re: Identifying the conflicted data in conflicted workspace
            690485
            Hi Ben,

            Thanks a lot for the reply. It works for me. But, Im looking for further more information about the conflicts in a workspace.

            Im looking out for a list of all inserts, updates and deletes that exist in the workspace with respect to LIVE. This will include any transactions that have been merged into the workspace from any child workspaces.

            And, is there any SQL statement which returns conflicted column name/attribute in a row?

            Any help in this regards will be greatly appriciated. Thanks for the time and consideration.

            Regards,
            Kumar
            • 3. Re: Identifying the conflicted data in conflicted workspace
              aschilling
              Kumar,

              if you are just interested in the differences without the conflicts then you can use the _DIFF views of the versioned tables.
              to get data filled in there you need to call SetDiffVersions first.
              after that you can examin the additional columns the DIFF-views provide. especially the WM_CODE seem to be interesting for you.

              regards,

              Andreas
              • 4. Re: Identifying the conflicted data in conflicted workspace
                690485
                Hi All,

                Thanks for your help.

                In my case, i have a parent which has several child workspaces. When I merge child workspaces (with edits) to it's parent, I can retrieve the information about all inserts, updates and deletes in my Parent using _DIFF view. But, I could not identify which insert, update or delete in the parent workspace has come from which child workspace.

                I have been trying to dig this information from all the views but failed to find it. I could not find much info from WM_DIFFVER column values in _DIFF view :(

                Can anyone help me in this regards.

                Regards,
                Kumar

                Edited by: Kumar on Jan 19, 2012 7:00 PM
                • 5. Re: Identifying the conflicted data in conflicted workspace
                  Ben Speckhard-Oracle
                  Hi,

                  Workspace Manager does not store information to identify which workspace was responsible for merging a particular row. That would need to be part of a user-defined column. You could use a trigger that only executes during merge, for example. What did you need to know this information for?

                  Also, to answer an earlier question that you had... Conflicts are flagged only at the row level, so there is no information available as to which specific column caused the conflict. For scalar columns, that would be easy enough to determine. For non-scalar columns, again this would need to be maintained within user defined columns.

                  WM_DIFFVER tells you the workspace/savepoint of the row. The DIFF view presents the diff in sets of 3 rows, with the WMDIFFVER column used to distinguishing between the 2 specified workspaces/savepoints and the BASE row.

                  Regards,
                  Ben