Oracle Database 11g Replay: The In-built Recrder fr Real Applicatin Testing Amaresh Mandal Infsys Technlgies Ltd Intrductin Oracle Database 11g intrduced a new feature Database Replay which helps in perfrming Real Applicatin testing. This feature allws the database/system administratr t simulate actual prductin wrklad t test the impact f infrastructure and database level changes n test server. Database Replay can be used t assess the impact f any system changes such as belw: Database upgrades, patches, parameter, schema changes, Cnfiguratin changes such as cnversin frm a single instance t RAC, Strage, netwrk, intercnnect changes, Operating system, hardware migratins, patches, upgrades, parameter changes, Database replay captures a wrklad n the prductin system with negligible perfrmance verheads and replays it n a test system with the exact timing, cncurrency, and transactin characteristics f the riginal wrklad. This makes pssible cmplete assessment f the impact f the change. Extensive analysis and reprting (AWR, ADDM reprt and DB Replay Reprt) is prvided t help identify any ptential prblems, such as new errrs encuntered and perfrmance divergences. Need fr Database Replay Lwer testing cst DBAs and System administratrs can have a test infrastructure t test their changes withut the verhead f having t duplicate the infrastructure. Database Replay des nt have set up verhead t recreate a middle-tier r a web server tier r build test scripts. Thus, DBAs and system administratrs can test and upgrade the infrastructure cmpnents as the changes have been truly tested and validated using prductin scenaris. Faster deplyment Database Replay des nt require DBA t spend a lt f time in getting functinal knwledge f the applicatin fr develping test scripts. With Database Replay, DBAs have a full prductin wrklad available t test and rllut any change. This reduces applicatin testing cycles and brings significant cst savings t business. Page #1
Overview f Oracle 11G Database Replay Oracle 11G Database Replay allws the database administratr t capture the full prductin wrklad and then recreate the same in the test envirnment. Wrklad Capture tracks and captures all external database requests and writes the data int a binary file called capture file. Wrklad Prcessing is the step where the capture files are cnverted int replay files. Replay files cntain all the necessary metadata needed fr replaying the wrklad. This is the mst resurce intensive task and shuld be perfrmed n a nn-prductin server. Once the replay files are created, they can be reused any number f times withut having t reprcess the wrklad. Wrklad Replay is perfrmed thrugh the replay client which prcesses the replay files and submits the lad / calls t the database with the exact timing and cncurrency that it has recrded in the riginal system. Analysis and Reprting allws t generate detailed analysis f the capture and replay. All errrs encuntered during replay are reprted. Any divergence in rws and basic cmparisns between the capture and replay are shwn in Replay and Capture reprt. Besides, AWR, ADDM can be used fr detailed analysis and diagnstics. Database Replay Phases Wrklad Capture The database are tracked and stred in binary files n file system, called capture files. These files cntain all relevant infrmatin abut the call needed fr replay such as SQL text, bind values, SCN, etc. 1) Backup prductin Database s we can restre database n test envirnment n same SCN level f database t minimize data divergence. 2) Add/remve filter By default, all user sessins are recrded during wrklad capture. Yu can use wrklad filters t specify which user sessins t include in r exclude frm the wrklad. 3) Create directry make sure enugh space is there t hld the capture files. 4) Capture wrklad using OEM r dbms packages. The fllwing shws the prductin capture prcess using OEM. Page #2
Wrklad Prcessing Once the wrklad has been captured, the infrmatin in the capture files has t be prcessed preferably n the test system. This prcessing transfrms the captured data and creates all necessary metadata needed fr replaying the wrklad. Page #3
Wrklad Replay 1) Restre database backup taken t test system and start the test database. 2) Initialize and Prepare replay. 3) Start clients and begin Replay. Page #4
Analysis and Reprting The Database Capture and Replay reprt indicates if any system change will affect the system perfrmance. There are 3 types f divergence reprts, namely Data divergence, Errr divergence and Perfrmance divergence. CONCLUSION Database Replay prvides Real Applicatin Testing which helps rganizatins t lwer their testing csts. It remves the dependency f preparing scripts t generate prductin wrklad. It gives DBAs and system administratrs an easy-t-deply slutin fr testing and rlling ut system changes with reduced hardware and sftware csts. Page #5