Loading Divergence Data for Workload Replay

Loading divergence data for workload replay imports rows for every replay attempt retrieved from the replay directory into the DBA_WORKLOAD_REPLAY_DIVERGENCE view, which displays information about diverged calls and errors during replay attempts. You can choose to load divergence data for either a single workload replay or all workload replays in a given directory object.

To load divergence data for workload replay:

  1. Call the WORKLOAD_REPLAY.LOAD_DIVERGENCE procedure using one of the following parameters:

    • The replay_id parameter specifies the ID of the workload replay for which you want to load divergence data. Use this parameter if you only want to load divergence data for a single workload replay.

    • The replay_dir parameter specifies the name of the directory object (the value is case-sensitive). Use this parameter if you want to load divergence data for all workload replays in a given directory object.

  2. To check the loading status of divergence data, query the DIVERGENCE_LOAD_STATUS column in the DBA_WORKLOAD_REPLAYS view.

    A value of TRUE indicates that the divergence data is loaded, and a value of FALSE indicates that it has not been loaded.

Example 12-2 Loading divergence data for a single workload replay

The following example shows how to load divergence data for the workload replay with a replay_id value of 12, and to validate that the divergence data is loaded.

DECLARE
  rep_id         NUMBER;
BEGIN
  rep_id := DBMS_WORKLOAD_REPLAY.LOAD_DIVERGENCE (replay_id => 12);
  SELECT divergence_load_status
    FROM dba_workload_replays
   WHERE capture_id = rep_id;
END;
/