Creating a Replay Filter Set

After the workload replay filters are added, you can create a set of replay filters to use with workload replay. When creating a replay filter set, all workload replay filters that were added since the previous replay filter set was created will be used.

To create a replay filter set:

  • Use the CREATE_FILTER_SET procedure:

    BEGIN
      DBMS_WORKLOAD_REPLAY.CREATE_FILTER_SET (
                               replay_dir => 'apr09',
                               filter_set => 'replayfilters',
                               default_action => 'INCLUDE');
    END;
    /
    

    In this example, the CREATE_FILTER_SET procedure creates a replay filter set named replayfilters, which will replay all captured calls for the replay stored in the apr09 directory, except for the part of the workload defined by the replay filters.

    The CREATE_FILTER_SET procedure in this example uses the following parameters:

    • The replay_dir parameter specifies the directory where the replay to be filtered is stored

    • The filter_set parameter specifies the name of the filter set to create

    • The default_action parameter determines if every captured database call should be replayed and whether the workload replay filters should be considered as inclusion or exclusion filters.

      If this parameter is set to INCLUDE, all captured database calls will be replayed, except for the part of the workload defined by the replay filters. In this case, all replay filters will be treated as exclusion filters, since they will define the part of the workload that will not be replayed. This is the default behavior.

      If this parameter is set to EXCLUDE, none of the captured database calls will be replayed, except for the part of the workload defined by the replay filters. In this case, all replay filters will be treated as inclusion filters, since they will define the part of the workload that will be replayed.