ACE Director Alum Daniel Morgan, founder of Morgan's Library, is scheduling
complimentary technical Workshops on Database Security for the first 30
Oracle Database customers located anywhere in North America, EMEA, LATAM, or
APAC that send an email to
asra_us@oracle.com. Request a Workshop for
your organization today.
Purpose
Internal supporting package supporting
DBMS_WORKLOAD_CAPTURE for capturing transactions for real application
testing.
Looks into the workload capture present in the given directory and retrieves all the information regarding that capture,
imports the information into the DBA_WORKLOAD_CAPTURES and DBA_WORKLOAD_FILTERS views and returns the appropriate DBA_WORKLOAD_CAPTURES_ID
dbms_workload_capture_i.get_capture_info(dir IN VARCHAR2)
RETURN NUMBER;
set serveroutput on
DECLARE
n NUMBER;
BEGIN
n := dbms_workload_capture_i.get_capture_info('CTEMP');
dbms_output.put_line(n);
END;
/
SELECT name, start_scn, end_scn, duration_secs, filters_used, capture_size
FROM dba_workload_captures;
Based on the specified action will encrypt or decrypt the identified capture
dbms_workload_capture_i.handle_encryption(
action IN BINARY_INTEGER,
src_dir IN VARCHAR2,
dst_dir IN VARCHAR2,
encryption IN VARCHAR2); -- options: 'AES128', 'AES192', 'AES256'
Imports an AWR snapshot that was exported earlier from the original capture system using DBMS_WORKLOAD_CAPTURE EXPORT_AWR.
To avoid DBID conflicts, this function will generate a random DBID and use that DBID to populate the SYS AWR schema. The value used for DBID can be found in DBA_WORKLOAD_CAPTURES AWR_DBID.
dbms_workload_capture_i.import_awr(
cpature_id IN NUMBER
staging_schema IN VARCHAR2
force_cleanup IN BOOLEAN)
RETURN NUMBER;
Start workload capture and store data in different buckets. For instance, workload in 9AM - 10AM will be stored in bucket 1 while workload in 10AM - 12PM will be stored in bucket 2.
dbms_workload_capture_i.start_batch_capture(
name IN VARCHAR2,
dir IN VARCHAR2,
duration IN NUMBER,
default_action IN VARCHAR2,
auto_unrestrict IN BOOLEAN,
capture_sts IN BOOLEAN,
sts_cap_interval IN NUMBER,
plsql_mode IN VARCHAR2,
encryption IN VARCHAR2);
dbms_workload_capture_i.start_capture(
name IN VARCHAR2,
dir IN VARCHAR2,
duration IN NUMBER,
default_action IN VARCHAR2,
auto_unrestruct IN BOOLEAN,
CAPTURE_STS IN BOOLEAN,
STS_CAP_INTERVAL IN NUMBER,
PLSQL_MODE IN VARCHAR2,
ENCRYPTION IN VARCHAR2);
Signals all connected sessions to store workload captures into a new bucket. By default, SWITCH_BUCKET will create an AWR snapshot for the workload captured in the current bucket.
dbms_workload_capture.switch_bucket(create_snapshot IN BOOLEAN DEFAULT TRUE);