Setting the Consolidated Replay Directory Using APIs

This section describes how to set the consolidated replay directory on the test system using the DBMS_WORKLOAD_REPLAY package. Set the consolidated replay directory to a directory on the test system that contains the workload captures to be consolidated and replayed. For information about setting up the test system, see "Setting Up the Test System for Consolidated Database Replay".

To set the replay directory:

  1. Use the SET_CONSOLIDATED_DIRECTORY procedure:

    DBMS_WORKLOAD_REPLAY.SET_CONSOLIDATED_DIRECTORY (
       replay_dir IN VARCHAR2);
    
  2. Set the replay_dir parameter to the name of the directory object that points to the operating system directory containing the workload captures to be used for workload consolidation.

Tip:

The SET_REPLAY_DIRECTORY procedure is deprecated and replaced by the SET_CONSOLIDATED_DIRECTORY procedure.

This example shows how to set the replay directory to a directory object named rep_dir.

EXEC DBMS_WORKLOAD_REPLAY.SET_CONSOLIDATED_DIRECTORY ('rep_dir');

You can also use the DBMS_WORKLOAD_REPLAY package to view the current consolidated replay directory that has been set by the SET_CONSOLIDATED_DIRECTORY procedure.

To view the current consolidated replay directory that has been set:

  • Use the GET_REPLAY_DIRECTORY function:

    DBMS_WORKLOAD_REPLAY.GET_REPLAY_DIRECTORY RETURN VARCHAR2;
    

    If no consolidated replay directory has been set, then the function returns NULL.

See Also: