Database Replay Workflow in Oracle 11g Enterprise Manager:
Part-II : Replay using Enterprise Manager
As with the PL/SQL API replay example, we must create a directory and directory object on the test server to hold the capture files from the production server. If you are using an existing directory, as we are, you must make sure it is empty before transferring the capture files to it.
Once the capture files are in place, log on to Enterprise Manager and navigate to the Database Replay screen. Click on the “Preprocess Captured Workload” task icon.
[oracle@localhost ~]$ . oraenv
ORACLE_SID = [ORCL] ? catdb
The Oracle base for ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1 is /u01/app/oracle
[oracle@localhost ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Sat Feb 27 11:23:34 2016
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area 630501376 bytes
Fixed Size 2215984 bytes
Variable Size 385880016 bytes
Database Buffers 234881024 bytes
Redo Buffers 7524352 bytes
Database mounted.
Database opened.
SQL>Exit
[oracle@localhost ~]$ lsnrctl start
LSNRCTL for Linux: Version 11.2.0.1.0 – Production on 28-FEB-2016 14:42:43
Copyright (c) 1991, 2009, Oracle. All rights reserved.
Starting /u01/app/oracle/product/11.2.0/db_1/bin/tnslsnr: please wait…
TNSLSNR for Linux: Version 11.2.0.1.0 – Production
System parameter file is /u01/app/oracle/product/11.2.0/db_1/network/admin/listener.ora
Log messages written to /u01/app/oracle/diag/tnslsnr/localhost/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost.localdomain)(PORT=1521)))
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost.localdomain)(PORT=1521)))
STATUS of the LISTENER
————————
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.1.0 – Production
Start Date 28-FEB-2016 14:42:43
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/11.2.0/db_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/diag/tnslsnr/localhost/listener/alert/log.xml
Listening Endpoints Summary…
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost.localdomain)(PORT=1521)))
Services Summary…
Service “catdb” has 1 instance(s).
Instance “catdb”, status READY, has 1 handler(s) for this service…
[oracle@localhost ~]$ . oraenv
ORACLE_SID = [ORCL] ? catdb
The Oracle base for ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1 is /u01/app/oracle
[oracle@localhost ~]$ emctl start dbconsole
Oracle Enterprise Manager 11g Database Control Release 11.2.0.1.0
Copyright (c) 1996, 2009 Oracle Corporation. All rights reserved.
https://localhost.localdomain:5501/em/console/aboutApplication
Starting Oracle Enterprise Manager 11g Database Control ……… started.
——————————————————————
Logs are generated in directory /u01/app/oracle/product/11.2.0/db_1/localhost.localdomain_catdb/sysman/log.
Now Navigate to “Software and Support” Tab and click on “Database Replay” Link.
Now click on “Preprocess Workload ” Go to Task Button.
Now click on “Create Directory Object” , To Create appropriate Directory object where you want to store work capture files.
Click on “Show SQL” button will show you the SQL will run in background.
On clicking “Test File System” Button will tell you whether the physical path specified is existing or not. First you need to provide Host Credentials and click on “Login” button.
Now click on “OK” button.
Select the directory object that points to the capture files. The screen will immediately update with information about the capture files. Click the “Preprocess Workload” button.
Click the “Next” button on the “Database Version” screen.
Enter the host credentials in the “Schedule” screen, then click the “Next” button.
Assuming everything looks OK, click the “Submit” button.
Eventually, you return to the “Database Replay” screen with a confirmation that the preprocess job has been scheduled. This job executes almost immediately, so you will probably not have to check the running jobs screen to see if it is still running.
On the “Database Replay” screen, click the “Replay Workload” task icon.
Select the appropriate directory object.
The screen will update immediately to reflect the contents of the selected directory. Click the “Set up Replay” button.
Read the prerequisites, then click the “Continue” button.
Click the “Continue” button on the “References to External Systems” screen.
Enter a replay name, then click the “Next” button. In this example I made the replay name match the capture name, but it is not necessary.
Accept the default customized options by clicking the “Next” button.
Click the “Next” button on the “Prepare Replay Clients” screen.
The “Wait For Client Connections” screen continually refreshes looking for Replay Client processes. At this point you must start the replay clients manually on the test server.
$ wrc system/system@catdb mode=replay replaydir=/u01/app/oracle/paw_db_replay_capture1
Workload Replay Client: Release 11.1.0.6.0 – Production on Tue Oct 30 09:34:14 2007
Copyright (c) 1982, 2007, Oracle. All rights reserved.
Wait for the replay to start (09:34:14)
Once the replay client has started it will be shown in the “Wait For Client Connections” screen and you can click the “Next” button.
Click the “Submit” button on the “Review” screen. Notice the recommendation to alter the system time to match the capture start time. For a real replay this would make sense, as it may affect any time-based processing, but for this example it can be ignored.
Wait while the replay process is initiated.
The “View Workload Replay” screen will refresh repeatedly until the replay process is complete. Once complete, the page contains a comparison of the processing done during the capture and the replay.
After completion you will get this screen.
Clicking on “View Workload Replay Report” button will display the report. You can also save your reports by clicking. “Save To File” button. It will ask you to save the report. Click “OK” button.
The comparison between the capture and replay processing allows you to determine if a system change has affected performance of the system.
Thank you for reading… This is Airy…Enjoy 🙂
2: Database Replay System Architecture
3: Database Replay PL/SQL Procedures -I ( Capture )
4: Database Replay PL/SQL Procedures – II ( Replay )
5: Database Replay Workflow in Enterprise Manager-I ( Capture )