This section describes how to capture a database workload using Enterprise Manager. The primary tool for capturing database workloads is Oracle Enterprise Manager.
Tip:
If Oracle Enterprise Manager is unavailable, you can capture database workloads using APIs, as described in "Capturing a Database Workload Using APIs".
To capture a database workload using Enterprise Manager:
If the Database Login page appears, log in as a user with administrator privileges.
The Database Replay page appears.
The Create Capture: Plan Environment page appears.
The Create Capture: Database page appears.
Tip:
For information about the prerequisites, see "Prerequisites for Capturing a Database Workload".
The Add pop-up appears.
The Search and Select: Targets pop-up appears.
The Add pop-up reappears with added sections for Database Credential and Database Host Credential.
After the Capture, the files are copied to the storage ___location, unless you use the intermediate storage ___location as the final storage ___location.
Note:
For captures on an Oracle RAC database, Enterprise Manager only supports Oracle RAC configured with a shared file system.
The selected target database now appears in the list of databases in the Select Production Databases table.
The Create Capture: Options page appears.
Under the SQL Performance Analyzer section, select whether to capture SQL statements into a SQL tuning set during workload capture.
While Database Replay provides an analysis of how a change affects your entire system, you can use a SQL tuning set in conjunction with the SQL Performance Analyzer to gain a more SQL-centric analysis of how the change affects SQL statements and execution plans.
By capturing a SQL tuning set during workload capture and another SQL tuning set during workload replay, you can use the SQL Performance Analyzer to compare these SQL tuning sets to each other without having to re-execute the SQL statements. This enables you to obtain a SQL Performance Analyzer report and compare the SQL performance, before and after changes, while running Database Replay.
Note:
Capturing SQL statements into a SQL Tuning Set is the default, and is the recommended workload capture option. Capturing SQL statements into a SQL Tuning Set is not available for Oracle RAC.
Tip:
For information about comparing SQL tuning sets using SQL Performance Analyzer reports, see "Generating SQL Performance Analyzer Reports Using APIs".
Under the Workload Filters section, select whether to use exclusion filters by selecting Exclusion in the Filter Mode list, or inclusion filters by selecting Inclusion in the Filter Mode list.
To add filters, click Add and enter the filter name, session attribute, and value in the corresponding fields.
Tip:
For more information, see "Using Filters with Workload Capture".
After selecting the desired workload capture options, click Next.
The Create Capture: Storage page appears.
The Storage page now requests Host Credentials and a Storage Location.
The Create Capture: Schedule page appears.
The default capture duration is 5 minutes. Change the capture duration to capture representative activity over a time period of interest that needs to be tested.
The Create Capture: Review page appears.
The "Capture SQL statements into a SQL Tuning Set during workload capture" option is enabled by default. Uncheck this option if you do not want to compare SQL tuning sets at the end of the Replay.
The Database Replay page reappears, displays a message that the capture was created successfully, and displays the status of the capture in the Captures list, such as "Scheduled."
The Capture Summary page appears, and displays several attributes, including the average active sessions, a workload comparison, and related concurrent captures, if any.
Tip:
After capturing a workload on the production system, you need to preprocess the captured workload, as described in Preprocessing a Database Workload .