Adding Workload Replay Filters

This section describes how to add a new filter to be used in a replay filter set.

To add a new filter:

  • Use the ADD_FILTER procedure:

    BEGIN
      DBMS_WORKLOAD_REPLAY.ADD_FILTER (
                               fname => 'user_ichan',
                               fattribute => 'USER',
                               fvalue => 'ICHAN');
    END;
    /
    

    In this example, the ADD_FILTER procedure adds a filter named user_ichan, which can be used to filter out all sessions belonging to the user name ICHAN.

    The ADD_FILTER procedure in this example uses the following parameters:

    • The fname required parameter specifies the name of the filter that will be added.

    • The fattribute required parameter specifies the attribute on which the filter will be applied. Valid values include PROGRAM, MODULE, ACTION, SERVICE, USER, and CONNECTION_STRING. You must specify a valid captured connection string that will be used during replay as the CONNECTION_STRING attribute.

    • The fvalue required parameter specifies the value for the corresponding attribute on which the filter will be applied. It is possible to use wildcards such as % with some of the attributes, such as modules and actions.

    Once all workload replay filters are added, you can create a replay filter set that can be used when replaying the workload.