Use Database Replay Feature to Help With Upgrade From 10.2.0.4 to 11g_748895.1
How to Use Database Replay Feature to Help With The Upgrade From 10.2.0.4 to 11g (文件 ID 748895.1)
In this Document
Applies to:Oracle Database - Enterprise Edition - Version 10.2.0.4 and laterInformation in this document applies to any platform. ***Checked for relevance on 25-Jun-2012*** Goal
The purpose behind creating this article is to give a detailed information about using the Database Replay feature before upgrading from 10.2.0.4 to 11g, supported by a life example.
NOTE:
The database capture functionality was introduced with 10.2.0.4. However, patches are available for some earlier versions. Please refer to: Using Real Application Testing Functionality in Earlier Releases (Doc ID 560977.1) Note also that Database Capture and Replay is part of the Real Application Testing (RAT) option which needs a separate license. SolutionSteps for Database Replay
BEGIN
DBMS_WORKLOAD_CAPTURE.ADD_FILTER ( fname => 'user_scott', fattribute => 'USER', fvalue => 'SCOTT'); END;
CREATE OR REPLACE DIRECTORY db_replay_dir AS '/u04/oraout/test/db-replay-capture';
BEGIN
DBMS_WORKLOAD_CAPTURE.start_capture ( name => 'capture_testing',dir=>'DB_REPLAY_DIR', duration => NULL ); END;
Note: In 10.2.0.4 make sure that the PRE_11G_ENABLE_CAPTURE parameter should be set to true otherwise if you try to use the capture feature you will get the following error;
ORA-15591: cannot start capture because parameter "PRE_11G_ENABLE_CAPTURE" is not enabled. You can use the following if it is set to FALSE. SQL> alter system set pre_11g_enable_capture=true;
BEGIN
DBMS_WORKLOAD_CAPTURE.finish_capture; END;
exec DBMS_WORKLOAD_REPLAY.process_capture('DB_REPLAY_DIR');
BEGIN
DBMS_WORKLOAD_REPLAY.initialize_replay ( replay_name => 'TEST_REPLAY', replay_dir => 'DB_REPLAY_DIR'); END;
exec DBMS_WORKLOAD_REPLAY.prepare_replay(synchronization => TRUE)
$ wrc mode=calibrate replaydir=/u03/oradata/test/db-replay-capture
$ wrc mode=replay replaydir=/u03/oradata/test/db-replay-capture Workload Replay Client: Release 11.1.0.6.0 - Production on Wed Dec 26 00:31:52 2007 Copyright (c) 1982, 2007, Oracle. All rights reserved. Wait for the replay to start (00:31:52)
BEGIN
DBMS_WORKLOAD_REPLAY.start_replay; END; / . . . $ wrc mode=replay replaydir=/u03/oradata/test/db-replay-capture Workload Replay Client: Release 11.1.0.6.0 - Production on Wed Dec 26 00:31:52 2007 Copyright (c) 1982, 2007, Oracle. All rights reserved. Wait for the replay to start (00:31:52) Replay started (00:33:32) Replay finished (00:42:52)
SQL> select * from v$version;
BANNER ---------------------------------------------------------------- Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi PL/SQL Release 10.2.0.4.0 - Production CORE 10.2.0.4.0 Production TNS for Solaris: Version 10.2.0.4.0 - Production NLSRTL Version 10.2.0.4.0 - Production SQL> BEGIN DBMS_WORKLOAD_CAPTURE.ADD_FILTER ( fname => 'user_scott', fattribute => 'USER', fvalue => 'SCOTT'); END; / 2 3 4 5 6 7 PL/SQL procedure successfully completed. SQL> CREATE OR REPLACE DIRECTORY db_replay_dir AS '/emea/bde/64bit/app/oracle/product/10.2.0/db_replay_dir'; 2 Directory created. SQL> BEGIN DBMS_WORKLOAD_CAPTURE.start_capture ( name => 'capture_testing',dir=>'DB_REPLAY_DIR', duration => NULL ); END; / 2 3 4 5 6 BEGIN * ERROR at line 1: ORA-15591: cannot start capture because parameter "PRE_11G_ENABLE_CAPTURE" is not enabled ORA-06512: at "SYS.DBMS_WORKLOAD_CAPTURE", line 799 ORA-06512: at line 2 SQL> SQL> show parameter pre_11g NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ pre_11g_enable_capture boolean FALSE SQL> alter system set pre_11g_enable_capture=true; System altered. SQL> BEGIN DBMS_WORKLOAD_CAPTURE.start_capture ( name => 'capture_testing',dir=>'DB_REPLAY_DIR', duration => NULL ); END; / 2 3 4 5 6 PL/SQL procedure successfully completed. SQL> BEGIN DBMS_WORKLOAD_CAPTURE.finish_capture; END; / 2 3 4 PL/SQL procedure successfully completed. SQL>exit /*-----------------------------------------------------------------*/ /*Then connecting the the 11.1.0.6 database located in the same box*/ /*-----------------------------------------------------------------*/ SQL> select * from v$version; BANNER -------------------------------------------------------------------------------- Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - 64bit Production PL/SQL Release 11.1.0.6.0 - Production CORE 11.1.0.6.0 Production TNS for Solaris: Version 11.1.0.6.0 - Production NLSRTL Version 11.1.0.6.0 - Production SQL> CREATE OR REPLACE DIRECTORY db_replay_dir AS '/emea/bde/64bit/app/oracle/product/10.2.0/db_replay_dir'; 2 Directory created. SQL> exec DBMS_WORKLOAD_REPLAY.process_capture('DB_REPLAY_DIR'); PL/SQL procedure successfully completed. SQL> BEGIN DBMS_WORKLOAD_REPLAY.initialize_replay ( replay_name => 'TEST_REPLAY', replay_dir => 'DB_REPLAY_DIR'); END; / 2 3 4 5 6 PL/SQL procedure successfully completed. SQL> exec DBMS_WORKLOAD_REPLAY.prepare_replay(synchronization => TRUE); PL/SQL procedure successfully completed. SQL> BEGIN DBMS_WORKLOAD_REPLAY.start_replay; END; / 2 3 4 BEGIN * ERROR at line 1: ORA-20223: No replay clients have connected yet! Please issue START_REPLAY() after one or more WRC replay clients have been started! ORA-06512: at "SYS.DBMS_WORKLOAD_REPLAY", line 1469 ORA-06512: at line 2 SQL> exit Disconnected from Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options [rmtdcsol3]/emea/bde/64bit/app/oracle/product/10.2.0/db_replay_dir> wrc replaydir=/emea/bde/64bit/app/oracle/product/10.2.0/db_replay_dir mode=calibrate Workload Replay Client: Release 11.1.0.6.0 - Production on Tue Nov 11 06:58:52 2008 Copyright (c) 1982, 2007, Oracle. All rights reserved. Report for Workload in: /emea/bde/64bit/app/oracle/product/10.2.0/db_replay_dir ----------------------- Recommendation: Consider using at least 1 clients divided among 1 CPU(s). Workload Characteristics: - max concurrency: 1 sessions - total number of sessions: 2 Assumptions: - 1 client process per 50 concurrent sessions - 4 client process per CPU - think time scale = 100 - connect time scale = 100 - synchronization = TRUE [rmtdcsol3]/emea/bde/64bit/app/oracle/product/10.2.0/db_replay_dir> wrc replaydir=/emea/bde/64bit/app/oracle/product/10.2.0/db_replay_dir Workload Replay Client: Release 11.1.0.6.0 - Production on Tue Nov 11 07:00:57 2008 Copyright (c) 1982, 2007, Oracle. All rights reserved. Wait for the replay to start (07:00:57) Replay started (07:04:16) Replay finished (07:09:22) SQL> BEGIN DBMS_WORKLOAD_REPLAY.start_replay; END; / PL/SQL procedure successfully completed. SQL> select name,status from dba_workload_replays; NAME -------------------------------------------------------------------------------- STATUS ---------------------------------------- TEST_REPLAY COMPLETED
ReferencesNOTE:445116.1 - Using Workload Capture and Replay in 11GNOTE:463263.1 - Database Capture And Replay Common Errors And Reasons NOTE:560977.1 - Using Real Application Testing Functionality in Earlier Releases |
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/17252115/viewspace-1332141/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Oracle 10g upgrade from 10.2.0.1 to 10.2.0.4Oracle 10g
- Upgrade Oracle Database from 10.2.0.1 to 11.2.0.4OracleDatabase
- Oracle database 升級(文件)to 10.2.0.4 from 10.2.0.1OracleDatabase
- Oracle Database ReplayOracleDatabase
- upgrade oracle 10.2.0.4 for aixOracleAI
- use database 切換提示You can turn off this feature to get a quicker startupDatabaseUI
- oracle rat database replayOracleDatabase
- Upgrade Advisor: Database from 10.2 to 11.2 (文件 ID 251.1)Database
- Unable To Open Database After ASM Upgrade From Release 11.1 To Release 11.2DatabaseASM
- please help!webshere use hibernate err,urgentWeb
- database replay基礎學習Database
- Codebase Refactoring (with help from Go)Go
- Oracle 10g upgrade 10.2.0.2 -- 10.2.0.4Oracle 10g
- 10.2.0.3 升級到 10.2.0.4 database upgrade 報ORA-03113錯誤解決方法Database
- 資料庫負荷重放(Database replay)資料庫Database
- 11g Database Replay使用詳解Database
- Oracle 11g Database Replay 實驗OracleDatabase
- Efficient DevSecOps Workflows with a Little Help from AIdevAI
- Oracle Database Change Data Capture featureOracleDatabaseAPT
- Oracle Database 12C New FeatureOracleDatabase
- How To Upgrade ASM from 10.2 to 11.1 (RAC)ASM
- Oracle 資料庫重放(Database Replay)功能演示Oracle資料庫Database
- 執行database replay進行升級測試Database
- How to use rman backup a noarchivelog databaseHiveDatabase
- Exclusive access could not be obtained because the database is in useAIDatabase
- ORA-39700: database must be opened with UPGRADE optionDatabase
- 靜默方式安裝database vault 10.2.0.4Database
- [轉]How to release space from databaseDatabase
- 靜默升級oracle(文件)to 10.2.0.4 from 10.2.0.1Oracle
- How to use the Automatic Database Diagnostic Monitor(一)Database
- Oracle Database Upgrade Path Reference List [ID 730365.1]OracleDatabase
- 關於search help Exit和樣例收藏(from Jack Wu)
- RMAN 'Duplicate Database' Feature in 11G [ID 452868.1]Database
- Duplicate Database from ASM to Non- ASM Database Using RMANDatabaseASM
- Database Capture and Replay: Common Errors and Reasons (文件 ID 463263.1)DatabaseAPTError
- DATABASE REPLAY加壓播放引數之SCALE_UP_MULTIPLIERDatabase
- upgrade CRS & Oracle 10g to 10.2.0.4 for Linux x86_64bitOracle 10gLinux
- 10.2.0.4 DBCA problem :Error securing Database Control,...ErrorDatabase