Remapping Users

Asides from remapping connection strings, you can also use a new schema or user instead of the user captured in the workload capture. To view captured users, use the DBA_WORKLOAD_USER_MAP view. For information about user remapping, see "User Remapping".

To remap users:

  • Use the SET_USER_MAPPING procedure:

    BEGIN
      DBMS_WORKLOAD_REPLAY.SET_USER_MAPPING (capture_user => 'PROD',
                               replay_user => 'TEST');
    END;
    /
    

    In this example, the PROD user used during capture is remapped to the TEST user during replay.

    The SET_USER_MAPPING procedure in this example uses the following parameters:

    • The capture_user required parameter specifies the username captured during the time of the workload capture.

    • The replay_user required parameter specifies the username to which the captured user is remapped during replay. If this parameter is set to NULL, then the mapping is disabled.