12.2 Replaying a Database Workload Using Enterprise Manager

This section describes how to replay a database workload using Enterprise Manager.

The primary tool for replaying database workloads is Oracle Enterprise Manager. If Oracle Enterprise Manager is unavailable, you can also replay database workloads using APIs, as described in "Replaying a Database Workload Using APIs".

Note:

Before proceeding, you must already have created a replay task and created a replay from the replay task. To do this, see "Preparing a Single Database Workload Using Enterprise Manager" on .

To replay a database workload using Enterprise Manager:

  1. From the Enterprise menu of the Enterprise Manager Cloud Control console, select Quality Management, then Database Replay.

    If the Database Login page appears, log in as a user with administrator privileges.

    The Database Replay page appears.

  2. Select the Replay Tasks tab, then click the link for the desired replay task in the table.

    The Replay Task page for the replay appears.

  3. Click Create in the Replays section to create the replay.

    The Create Replay pop-up appears.

  4. Provide a required Name and optional description, then click the Target Database icon.

    The Search and Select: Targets pop-up appears.

  5. Choose the appropriate database, then click Select.

  6. Click OK in the Create Replay pop-up.

    The Database Replay page for your replay appears, which includes a Task List with a link to perform the replay.

  7. Click the link for the Replay Workload task.

    The Replay Workload: Locate Workload page appears.

  8. Select the desired workload location option.

    If you have not previously copied the workload from its storage location to the replay location where the replay clients can access it, select the option to copy the workload. Otherwise, select the option to use the existing replay directory that contains the workload to be replayed.

    Click Next to display the Replay Workload: Copy Workload page.

  9. Provide the required credentials and the new location of the workload directory to which you want to copy the workload, then click Next.

    The system responds by displaying a progress bar graph during processing, then displays the Replay Workload: Select Directory page after the copy operation concludes.

  10. Specify the Directory Object, or create a new Directory Object that points to the location that contains the workload. If you chose to copy from the workload location to a new location in the previous step, make sure that the directory object points to the exact location you specified in the New Location of the Workload Directory section.

    The system responds by displaying a Capture Summary. You can expand the Capture Details section to see the workload profile and workload filters. You can also generate a Workload Capture Analyzer Report and Database Capture Report. The Capture Summary does not appear for consolidated replays.

    Click Next to display the Replay Workload: Initialize Options page.

  11. In the SQL Performance Analyzer section, retain or disable the Capture SQL Statements option, which is enabled by default and recommended. You can disable this option if you do not want to compare SQL tuning sets at the end of the Replay.

    • The SQL Performance Analyzer can initiate an impact analysis of environmental changes on the performance of SQL statements within a SQL Tuning Set. You can create and analyze SQL Performance Analyzer tasks to test the effects of a database upgrade, initialization parameter change, Exadata simulation, or custom experiments. A task compares the effects of before-trial changes with after-trial changes.

      Although 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 replay, you can use SQL Performance Analyzer to compare this SQL tuning set to another SQL tuning set captured during workload capture, 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 change, while running Database Replay.

    • In the Identify Source section, initial replay options refer to the connection mappings and parameters on the Customize Options page. Connections are captured along with the workload.

      Note:

      This section does not appear for consolidated replays or Oracle RAC.

    Click Next to display the Replay Workload: Customize Options page.

  12. Remap captured connection strings to connection strings that point to the replay system. Note that you need to remap each capture connection. For example, in the illustration above, you would need to remap the connection for both capture12_1 and capture12_adc.

    (You can remap connections per workload for consolidated replay. There is a Capture Name drop-down to choose the workload.)

    Click the Connection Mappings tab. There are several methods you can use to remap captured connection strings. You can choose to:

    • Use a single connect descriptor for all client connections by selecting this option and entering the connect descriptor you want to use. The connect descriptor should point to the replay system.

      To test the connection, click Test Connection. If the connect descriptor is valid, an Information message is displayed to inform you that the connection was successful.

    • Use a single TNS net service name for all client connections by selecting this option and entering the net service name you want to use. All replay clients must be able to resolve the net service name, which can be done using a local tnsnames.ora file.

    • Use a separate connect descriptor or net service name for each client connect descriptor captured in the workload by selecting this option and, for each capture system value, entering a corresponding replay system value that the replay client will be use. If you selected the "Use replay options from a previous replay" option in the Initialize Options step, the "Use a separate connect descriptor" option is selected, and the previous Replay system values appear in the text field below.

      Note:

      This option does not apply to consolidated replays.

    For more information, see "Connection Remapping".

  13. Specify the replay options using the replay parameters, which control some aspects of the Replay.

    To modify the replay behavior, click the Replay Parameters tab and enter the desired values for each replay parameter. Using the default values is recommended. For information about setting the replay parameters, see "Specifying Replay Options".

    After setting the replay parameters, click Next.

    The Replay Workload: Prepare Replay Clients page appears.

  14. Ensure that the replay clients are prepared for replay:

    Before proceeding, the replay clients must be set up. For more information, see "Setting Up Replay Clients".

    1. Click Estimate to determine how many Replay clients and CPUs are required for the Replay.

    2. Click Add Replay Client Hosts to add a host or hosts for the Replay clients. (If you do not want to add any replay client hosts, you can still continue and start the replay clients from the command line outside of Enterprise Manager).

      The Search and Select: Replay Client Host pop-up appears.

      • Specify a Target Name and then click Go, or just click Go to display the entire list of available hosts.

      • Choose a host and then click Select.

    3. When the host name appears in the Target column of the Replay Client Hosts table, specify the number of Replay clients recommended from the estimate results, then make sure that the number of CPUs listed for the host satisfies the minimum recommendation in the estimate results. You should start at least one replay client per captured workload.

    4. In the Configured column, click the No link to configure the Replay client host in the pop-up that appears.

    5. Click Apply after you have finished providing input in the pop-up. The Configured column now displays Yes in the Replay Client Hosts table.

  15. Click Next to start the replay clients and display the Replay Workload: Wait for Client Connections page.

    For information about starting replay clients, see "Setting Up Replay Clients".

    Note:

    If you have reached this step in the process from the Enterprise menu, you also need to enter credentials for the replay job and for the replay result storage host.

    • As replay clients are started, the replay client connections are displayed in the Client Connections table.

    • The text below the clock changes if a replay client is connected.

    • The Client Connections table is populated when at least one replay client is connected.

    When all replay clients have connected, enter host credentials at the bottom of the page to start the replay job, then click Next to display the Replay Workload: Review page.

  16. Review the options and parameters that have been defined for the workload replay.

    • The value for Connected Replay Clients must be at least 1 in order to successfully submit the Replay Workload job.

    • The Submit button is enabled only if at least one Replay client is connected.

  17. If everything appears as you have intended, click Submit to submit the Replay job.

    After the replay starts, the Home tab of the Database Replay page for this replay reappears with a system message that states "The workload replay has started."

For information about monitoring an active workload replay, see "Monitoring an Active Workload Replay".