Live Workload Capture Replay between Autonomous AI Databases
When you use live workload capture replay, as a workload runs on a source Autonomous AI Database instance the workload is captured and simultaneously replays on a target refreshable clone.
- About Live Workload Capture Replay
Describes the live workload capture replay feature and shows the workflow for using live workload capture replay. - (Optional) Subscribe to Information Events to be Notified of Capture and Replay Details
Subscribe to Information events to be notified at the start and completion of a capture and replay. - Begin Live Workload Capture Replay on an Autonomous AI Database Instance
Describes the steps to start a live workload capture replay on your Autonomous AI Database instance. - Cancel a Live Workload Capture Replay on an Autonomous AI Database Instance
RunDBMS_CLOUD_ADMIN.CANCEL_WORKLOAD_CAPTURE
to cancel a live workload capture replay on your Autonomous AI Database instance. - Finish a Live Workload Capture Replay on an Autonomous AI Database Instance
RunDBMS_CLOUD_ADMIN.FINISH_WORKLOAD_CAPTURE
to complete a live workload capture replay on your Autonomous AI Database instance.
Parent topic: Capture-Replay Workloads Between Autonomous AI Databases
About Live Workload Capture Replay
Describes the live workload capture replay feature and shows the workflow for using live workload capture replay.
You can use live workload capture replay to evaluate the impact of any system change in the database, such as database upgrades, patches, or schema changes. This feature is only supported with local refreshable clones.
Note:
When concurrent operations, such as scaling, are in progress, the order between live replay transactions is not guaranteed. See Concurrent Operations on Autonomous AI Database for more information.Source Database | Target Database (Refreshable Clone) |
---|---|
At the Regular patch level |
At the Early patch level |
Oracle Database 19c |
Oracle Database 19c |
Oracle AI Database 26ai |
Oracle AI Database 26ai |
Oracle Database 19c |
Oracle AI Database 26ai |
The live workload capture replay workflow consists of the following steps:
-
Optionally, subscribe to workload capture replay informational events.
See (Optional) Subscribe to Information Events to be Notified of Capture and Replay Details for more information.
-
Run the
START_LIVE_WORKLOAD_REPLAY
procedure to start a live workload capture replay on the source database, specifying the OCID of the target refreshable clone. This procedure captures the full workload, including all concurrency, dependencies, and timing, and replays it on the target refreshable clone in real time as the workload runs on the source.See Begin Live Workload Capture Replay on an Autonomous AI Database Instance for more information.
-
Live workload capture replay runs for a specified duration. Optionally, you can run either the
DBMS_CLOUD_ADMIN.CANCEL_WORKLOAD_CAPTURE
orDBMS_CLOUD_ADMIN.FINISH_WORKLOAD_CAPTURE
procedure to finish or cancel the live workload capture replay, respectively.See Cancel a Live Workload Capture Replay on an Autonomous AI Database Instance and Finish a Live Workload Capture Replay on an Autonomous AI Database Instance for more information.
-
Detailed replay reports are provided to enable you to perform a thorough analysis of the capture and replay. Any errors encountered during replay are reported. Any divergence in rows returned by
DML
or queries are shown. Basic performance comparisons between capture and replay are also provided.You can find status and historical information for a live workload capture replay in the
DBA_CAPTURE_REPLAY_STATUS
andDBA_CAPTURE_REPLAY_HISTORY
views.See DBA_CAPTURE_REPLAY_STATUS View and DBA_CAPTURE_REPLAY_HISTORY View for more information.
(Optional) Subscribe to Information Events to be Notified of Capture and Replay Details
Subscribe to Information events to be notified at the start and completion of a capture and replay.
Note:
This step is optional. You can also find status and historical information for a workload capture and replay in theDBA_CAPTURE_REPLAY_STATUS
and DBA_CAPTURE_REPLAY_HISTORY
views.
See DBA_CAPTURE_REPLAY_STATUS View and DBA_CAPTURE_REPLAY_HISTORY View for more information.
Information events provide notifications about begin and end times of capture and replay and contain a PAR URL to access the capture and replay reports.
Autonomous AI Database Information events include the following:
WorkloadCaptureBegin
: This event is triggered when a workload capture is initiated.WorkloadCaptureEnd
: This event is triggered when a workload capture completes successfully and generates a pre-authenticated (PAR) URL to download the capture file.WorkloadReplayBegin
: This event is triggered when a workload replay is initiated.WorkloadReplayEnd
: This event is triggered when a workload replay completes successfully and generates a pre-authenticated (PAR) URL to download the replay reports.
See Information Events on Autonomous AI Database for more information.
Begin Live Workload Capture Replay on an Autonomous AI Database Instance
Describes the steps to start a live workload capture replay on your Autonomous AI Database instance.
The target database should be a refreshable clone. The capture and replay targets must be in a consistent state. So, you must provision a refreshable clone of the Autonomous AI Database instance on which you want to capture the workload.
See About Refreshable Clones on Autonomous AI Database for more information.
START_LIVE_WORKLOAD_REPLAY
procedure to begin live workload capture replay on your Autonomous AI Database. For example:BEGIN
DBMS_CLOUD_ADMIN.START_LIVE_WORKLOAD_REPLAY (
capture_replay_name => 'LiveReplayTest',
target_db_ocid => 'OCID1.autonomousdatabase.REGION..ID1',
capture_duration => 120,
reconnect_target => TRUE
);
END;
/
This begins a live workload capture replay from the source to the specified target which is a refreshable clone of the source database. The live workload capture replay involves following steps:-
Begins the capture on the source database.
-
Prepares the target refreshable clone: disconnects and upgrades (if required) the clone to Oracle AI Database 26ai. As a result, there may be a lag of a few minutes between the capture and replay start times.
While disconnecting, the target refreshable clone state changes to Updating. After the clone is successfully disconnected, the clone state changes to Available.
-
Begins workload replay on the target refreshable clone.
The
capture_replay_name
parameter specifies the workload capture replay name.The
target_db_ocid
parameter specifies the refreshable clone on which the workload is replayed.The
capture_duration
parameter specifies the duration in minutes for which the workload is replayed on the refreshable clone. This parameter is optional and defaults toNULL
. If you do not supply a value for this parameter, you must run theDBMS_CLOUD_ADMIN.CANCEL_WORKLOAD_CAPTURE
orDBMS_CLOUD_ADMIN.FINISH_WORKLOAD_CAPTURE
procedure to terminate or complete your live workload capture replay.The
reconnect_target
parameter specifies whether the refreshable clone reconnects to source after the replay is complete. This parameter is optional and defaults toTRUE
. While reconnecting, the target refreshable clone state changes to Updating. After the clone is successfully reconnected, the clone state changes to Available.See START_LIVE_WORKLOAD_REPLAY Procedure for more information.
Workload Capture and Replay Events
You can subscribe to the Information event
com.oraclecloud.databaseservice.autonomous.database.information
to
be notified about a workload capture. The event includes:
-
Information about the start and completion of
START_LIVE_WORKLOAD_REPLAY
. -
A PAR URL in the
captureDownloadURL
field of the event. Use the PAR URL to access the workload capture replay reports that are saved to Object Store. The reports are valid for seven (7) days from the date when the PAR URL is generated.
See (Optional) Subscribe to Information Events to be Notified of Capture and Replay Details for more information.
Cancel a Live Workload Capture Replay on an Autonomous AI Database Instance
Run DBMS_CLOUD_ADMIN.CANCEL_WORKLOAD_CAPTURE
to cancel a live workload capture replay on your Autonomous AI Database instance.
When you cancel a live workload capture replay, the capture replay terminates without generating any replay reports.
To cancel a live workload capture replay, you must be logged in as the ADMIN
user or have the EXECUTE
privilege on DBMS_CLOUD_ADMIN
.
Example:
BEGIN
DBMS_CLOUD_ADMIN.CANCEL_WORKLOAD_CAPTURE
;
END;
/
This cancels the currently running live workload capture replay and performs a refresh on the refreshable clone.
You can query the DBA_CAPTURE_REPLAY_STATUS
view to check the cancel workload status.
See DBA_CAPTURE_REPLAY_STATUS View for more information.
See CANCEL_WORKLOAD_CAPTURE Procedure for more information.
Finish a Live Workload Capture Replay on an Autonomous AI Database Instance
Run DBMS_CLOUD_ADMIN.FINISH_WORKLOAD_CAPTURE
to complete a live workload capture replay on your Autonomous AI Database instance.
Example to finish a workload capture on your Autonomous AI Database instance:
BEGIN
DBMS_CLOUD_ADMIN.FINISH_WORKLOAD_CAPTURE
;
END;
/
To run this procedure you must be logged in as the ADMIN user or have the EXECUTE
privilege on DBMS_CLOUD_ADMIN
. When you run this procedure a replay report is uploaded to Object Store.
See FINISH_WORKLOAD_CAPTURE Procedure for more information.
Workload Capture and Replay Events
You can subscribe to the Information event
com.oraclecloud.databaseservice.autonomous.database.information
to be notified about a workload capture. The event includes:
-
Information about the completion of
FINISH_WORKLOAD_CAPTURE
. -
A PAR URL in the
captureDownloadURL
field of the event. Use the PAR URL to access the workload capture replay reports that are saved to Object Store. The reports are valid for seven (7) days from the date when the PAR URL is generated.
See (Optional) Subscribe to Information Events to be Notified of Capture and Replay Details for more information.