This section describes how to add schedule orders to and remove schedule orders from replay schedules using the DBMS_WORKLOAD_REPLAY package. For information about adding schedule orders to replay schedules, see "Adding Schedule Orders".
Before adding schedule orders to a replay schedule, ensure that the following prerequisites are met:
A replay schedule to which the schedule orders are to be added is created.
For information about creating a replay schedule, see "Creating Replay Schedules Using APIs".
All workload captures participating in the schedule order are added to the replay schedule.
For information about adding workload captures to a replay schedule, see "Adding Workload Captures to Replay Schedules Using APIs".
To add schedule orders to a replay schedule:
Use the ADD_SCHEDULE_ORDERING
function:
DBMS_WORKLOAD_REPLAY.ADD_SCHEDULE_ORDERING ( schedule_capture_id IN VARCHAR2, wait_for_capture_id IN VARCHAR2) RETURN NUMBER;
This function adds a schedule order between two workload captures that have been added to the replay schedule. If a schedule order cannot be added, it returns a non-zero error code.
Set the schedule_capture_id
parameter to the workload capture that you want to wait in this schedule order.
Set the wait_for_capture_id
parameter to the workload capture that you want to be completed before the other workload capture can start in this schedule order.
To remove schedule orders from a replay schedule:
Use the REMOVE_SCHEDULE_ORDERING
procedure:
DBMS_WORKLOAD_REPLAY.REMOVE_SCHEDULE ORDERING ( schedule_capture_id IN VARCHAR2, wait_for_capture_id IN VARCHAR2);
Set the schedule_capture_id
parameter to the workload capture waiting in this schedule order.
Set the wait_for_capture_id
parameter to the workload capture that needs to be completed before the other workload capture can start in this schedule order.
To view schedule orders:
Use the DBA_WORKLOAD_SCHEDULE_ORDERING
view.
Oracle Database PL/SQL Packages and Types Reference for information about the ADD_SCHEDULE_ORDERING
function
Oracle Database PL/SQL Packages and Types Reference for information about the REMOVE_SCHEDULE_ORDERING
procedure
Oracle Database Reference for information about the DBA_WORKLOAD_SCHEDULE_ORDERING
view