Database Capture and Replay: Common Errors and Reasons (文件 ID 463263.1)
Database Capture and Replay: Common Errors and Reasons (文件 ID 463263.1)
In this Document
Applies to:Oracle Database - Enterprise Edition - Version 11.1.0.6 and laterOracle Exadata Hardware - Version 11.2.0.2 and later Information in this document applies to any platform. Oracle Server Enterprise Edition - Version: 11.1.0.6 to 11.1.0.6 11.1.0.6.X PurposeThe purpose of this note is to list some of the common errors and its reasons that a user may get during Database Capture and Replay process. Troubleshooting StepsORA-00439 "feature not enabled: %s"
SQL> begin
2 DBMS_WORKLOAD_REPLAY.PROCESS_CAPTURE(capture_dir => 'rat_staging_area_dir'); 3 end; 4 / begin * ERROR at line 1: ORA-00439: feature not enabled: Partitioning ORA-06512: at "SYS.DBMS_WORKLOAD_REPLAY", line 1860 ORA-06512: at line 2
Rem Turn ON the event to disable the partition check in this session ONLY. Rem Internal use of partitioning by Oracle features is permitted Rem without requiring separate license. alter session set events '14524 trace name context forever, level 1'; Rem Process in parallel BEGIN dbms_workload_replay.process_capture('&1', NULL); END; / Or, if the session in which the processing is done cannot be targeted (because of EM for instance), the event can be set system-wide for the duration of the processing (and turned off afterward).
alter system set events '14524 trace name context forever, level 1';
DBMS_WORKLOAD_CAPTURE.FINISH_CAPTURE(): Stopped database capture (not all sessions could flush their capture buffers)
select * from v$alert_types where reason_id between 160 and 162 order by reason_id;
AVG_IO_TIME average IO latency for Workload Replay Client threshold is 60 ms. ORA-01458 "invalid length inside variable character string"If you are getting ORA-01458 during get_replay_info or Initialize or prepare phase
WORKAROUND ORA-15505 "cannot start workload capture because instance %s encountered errors while accessing directory %s"
*Cause: Given instance could not access the specified CAPTURE directory
or the specified CAPTURE directory already had a workload capture in it. Action: Provide a directory object that is valid, empty and accessible from all the instances in the database cluster.
Example of ORA-15505
BEGIN dbms_workload_capture.start_capture('CAPTURE-v11106.us.oracle.com-20071014180343', 'TEST', NULL, 'INCLUDE', FALSE); END;
ERROR at line 1: ORA-15505: cannot start workload capture because instance 1 encountered errors while accessing directory "/home/oracle/DEMO/TEST" ORA-06512: at "SYS.DBMS_WORKLOAD_CAPTURE", line 799 ORA-06512: at line 1
SQL> BEGIN
2 dbms_workload_capture.start_capture('test_capture_1','TEST1_DIR'); 3 end; 4 / BEGIN * ERROR at line 1: ORA-15505: cannot start workload capture because instance 1 encountered errors while accessing directory "+DATA/RAC10G/TEST1" ORA-06512: at "SYS.DBMS_WORKLOAD_CAPTURE", line 799 ORA-06512: at line 2
ORA-15506 "cannot prepare instance %s for replay"
*Cause: Given instance encountered unexpected errors while trying
to prepare for a workload replay. *Action: Check the alert log and other diagnostics in the given instance to diagnose the problem.
1) Ensure proper shared directory during replay on a RAC database.
2) Unpublished Bug 7260616
3) ORA-15506 is one of the symptoms of bug 10327241. 4) For 10.2.0.5.6, apply patch for bug 9373986 as per Document 560977.1. ORA-15509 "workload replay has been cancelled"
*Cause: Workload replay was cancelled.
*Action: Restart the workload replay.
On RAC databases: For database replay you prepared for RAC database with capture_sts => TRUE
BEGIN
DBMS_WORKLOAD_REPLAY.PREPARE_REPLAY (synchronization => false, connect_time_scale => 100, think_time_scale => 100, think_time_auto_correct => TRUE, capture_sts => TRUE, sts_cap_interval => 900); END; / Then get following error:
Replay started (13:51:20)
Errors in file : ORA-15509: workload replay has been cancelled
Reason for this particular ORA-15509 The use of CAPTURE_STS=TRUE on RAC database has resulted in ORA-15509. Solution Do not use capture_sts => TRUE, use capture_sts => FALSE. capture_sts => TRUE which is not supported on RAC databases. Another reason for ora-15509 may be bug 13043788. Run workload replay again in debug mode to identify the bug:
Note:1536695.1 How to Find the Offending Workload Capture File ( rec file ) when a Replay is Cancelled or Crashes
Look for a trace file which contains similar data:
2013-09-30 18:43:45.102062 :keclrk.c@923: CALL_BEGIN ID: (2938229870708129811, 14196) ORFN: (0, 94)
2013-09-30 18:43:45.102079 :keclrk.c@928:Calltime: 6880011869561 Wallclock: 1378404986 2013-09-30 18:43:45.102114 :keclrk.c@1824: Skip bindline since kxscnit= 1 and kxscrtn= 2 2013-09-30 18:43:45.102138 :keclrk.c@1824: Skip bindline since kxscnit= 1 and kxscrtn= 2 2013-09-30 18:43:45.102421 :keclrk.c@1738: Skip bind_seection_end since kxscnit= 1 and kxscrtn= 2 DDE: Flood control is not active Solution Request a patch for bug:13043788.
ORA-15510 "cannot perform operation when "STATISTICS_LEVEL is "BASIC" "
*Cause: The STATISTICS_LEVEL initialization parameter was set to BASIC.
*Action: Change the STATISTICS_LEVEL initialization parameter setting to either TYPICAL or ALL. Example of ORA-15510 In 9.2.0.X.0
SQL> exec dbms_workload_capture.start_capture('RAT_9208_1129', 'RAT_CAPTURE_DIR');
BEGIN dbms_workload_capture.start_capture('RAT_9208_1129', 'RAT_CAPTURE_DIR'); END; * ERROR at line 1: ORA-15510: Message 15510 not found; product=RDBMS; facility=ORA ORA-06512: at "SYS.DBMS_WORKLOAD_CAPTURE", line 831 ORA-06512: at line 1 And in the alert log you may see:
DBMS_WORKLOAD_CAPTURE.FINISH_CAPTURE(): Stopped database capture (not all sessions could flush their capture buffers) at 11/30/2011 11:20:09
DBMS_WORKLOAD_CAPTURE.START_CAPTURE : STATISTICS_LEVEL not BASIC in instance 1 In 10.2.0.X
SQL v10204> exec DBMS_WORKLOAD_CAPTURE.START_CAPTURE(name =>'TEST_CAPTURE',dir =>'MY_WORKLOAD_DIR');
BEGIN DBMS_WORKLOAD_CAPTURE.START_CAPTURE(name =>'TEST_CAPTURE',dir =>'MY_WORKLOAD_DIR'); END; * ERROR at line 1: ORA-15510: cannot perform operation when "STATISTICS_LEVEL" is "BASIC" ORA-06512: at "SYS.DBMS_WORKLOAD_CAPTURE", line 799 ORA-06512: at line 1 Reasons for ORA-15510 STATISTICS_LEVEL set to BASIC. Solution set STATISTICS_LEVEL=TYPICAL in the init.ora or dynamically. For example
alter system set STATISTICS_LEVEL=TYPICAL;
ORA-15511 "cannot process workload capture because no user sessions were recorded"
*Cause: No user sessions were recorded in the given workload capture.
Processing this capture failed because no user workload was captured. *Action: Capture a workload in which at least one user session connects and performs some operations. Example of ORA-15511
BEGIN dbms_workload_replay.process_capture('TEST'); END;
* ERROR at line 1: ORA-15511: cannot process workload capture because no user sessions were recorded ORA-06512: at "SYS.DBMS_WORKLOAD_REPLAY", line 1138 ORA-06512: at line 1
Reason for ORA-15511 ORA-15513 "cannot access the input directory"During Initialize of Replay one gets an ORA-15513 error
ERROR at line 1:
ORA-15513: cannot access the input directory ORA-01458: invalid length inside variable character string ORA-06512: at "SYS.DBMS_WORKLOAD_REPLAY", line 2173 ORA-06512: at "SYS.DBMS_WORKLOAD_REPLAY", line 2185 ORA-06512: at line 2 Workaround In the Replay directory check for directory rep* for example
/data/shared/replay/rep226671820
backup directory rep226671820 to some other directory and delete it. The rep* directory is generated during each Replay.deleting the rep* directory from previous replays will not impact the new replay. or
alter system set "_wcr_control"=16384 ;
and do the Initialize again. Solution Apply patch for bug 10076544. ORA-15518 "parallel preprocessing encountered an unexpected error"
BEGIN dbms_workload_replay.process_capture('RAT_REC'); end;
raises the following error:
ORA-15518: parallel preprocessing encountered an unexpected error
ORA-06512: at "SYS.DBMS_WORKLOAD_REPLAY", line 2010 along with ORA 7445 kecppSeqEndCallProcessing()
Solution ORA-15552 "workload replay client cannot login to database server"The error ORA-15552 means workload replay client cannot login to database server.
*Cause: 1) the replay client used an invalid username or password;
2) the replay user does not have the privilege to switch user; 3) the recorded username does not exist in the replay database. *Action: 1) restart replay client with correct username and password 2) grant user switching privilege to the replay user 3) verify whether the replay database was restored properly
wrc userid=system replaydir='F:\PROXY11G\test'
Errors in file : ORA-15552: workload replay client cannot login to database server No password specified. The correct method is
wrc userid=system password=
ORA-15555 "workload replay client encountered unexpected error: %s
*Cause: Workload Replay Client encountered an unexpected error.
*Action: Check the Workload Replay Client's log files and the database server alert log to diagnose the problem.
ORA-15557 "workload replay client cannot access the replay directory or the database version do not match the preprocessing one"
*Cause: The Workload Replay Client could not access the directory that
contained the workload to be replayed, or the workload was preprocessed by a different version of the database. *Action: Restart the workload replay after specifying the correct replay directory, or preprocess it with the correct database.
ORA-15558 "replay thread encountered unexpected error"While running the WRC client while doing the replay WRC got an error ORA-15558
*Cause: A single replay thread got disconnected from the server due to an unexpected error.
*Action: Check the Workload Replay Client's log files and the database server alert log to diagnose the problem.
ORA-15563: workload replay client cannot spawn new threads
Cause: The Workload Replay Client does not have enough resource (CPU or memory) to spawn new threads.
Action: Restart the workload replay after allocating more resource (CPU and memory) to the Workload Replay Client or use more hosts as replay clients to drive the workload.
ORA-15567 "replay user %s encountered an error during a sanity check"
ORA-15567: replay user
This error means that the user has insufficient privileges to replay the workload. To resolve the error, give the user the correct privileges or grant them DBA privilege and grant admin option in order to replay the workload. ORA-15590 "encountered incomplete workload capture files"Cause: The captured workload contained one or more incomplete recording files. This can happen when the original workload capture's FINISH_CAPTURE command timed out while waiting for all the active sessions to close their workload capture files. Action: Incomplete capture files will not interfere with the processing and replaying of the captured workload. This is simply a warning message to point out that some database calls might not have been recorded due to FINISH_CAPTURE command timing out. During preprocessing you encountered ORA-15590
SQL> set serveroutput on
SQL> exec dbms_workload_replay.process_capture('DB_REPLAY_DIR', 1); BEGIN dbms_workload_replay.process_capture('DB_REPLAY_DIR', 1); END; * ERROR at line 1: ORA-15590: encountered incomplete workload capture files ORA-06512: at "SYS.DBMS_WORKLOAD_REPLAY", line 1860 ORA-06512: at line 1 This error basically informs the user that part of the workload may be missing. Check the alert.log for specific output like this:
DBMS_WORKLOAD_REPLAY.PROCESS_CAPTURE: WARNING: Preprocessing encountered an
INCOMPLETE file wcr_aw95ch0000488.rec in /backup01/capture1/capfiles/inst1/aa.
The capture file wcr_aw95ch0000488.rec is incomplete. I/O Error while capture:Captured Data may still be usable. During Capture if you get I/O Error while capture:Captured Data may still be usable.
This means the capture stopped automatically. Usually this would mean they run out of space on disk after capture had started or out of memory when trying to allocate PGA buffers. For Slow Preprocess issues
Apply one off Patch 11691834. AWR snapshots with error
While generating the Compare Period Report one may get the following message.
sqlplus / as sysdba
select * from wrm$_snap_error;
This will return rows.
delete from wrm$_snap_error where snap_id=
commit; ORA-20222 "Given capture_id %s is invalid or the corresponding capture failed"Example of ORA-20222 1)
connect / as sysdba
ORA-20222: Given capture_id "1" is invalid or the corresponding capture
2)
SQL> SQL> BEGIN
dbms_workload_capture.start_capture('CAPTURE-pos3_pos31-20061018122949', 'TEST1', 180, 'INCLUDE', TRUE); END; . * ERROR at line 1: ORA-20222: Encountered unexpected error while trying to start capture. ORA-6512: at "SYS.DBMS_WORKLOAD_CAPTURE", line 598 ORA-15505: cannot start workload capture because instance 2 encountered errors while accessing directory "/db11ghome/cap1" ORA-6512: 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!"
1)
SQL v11106> 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 2)
SQL> begin
dbms_workload_replay.prepare_replay( SYNCHRONIZATION=>TRUE, THINK_TIME_SCALE=>100); end; / begin * ERROR at line 1: ORA-20223: Invalid input. Database has not been INITIALIZED for REPLAY. Issue INITIALIZE_REPLAY() before PREPARE_REPLAY(). ORA-06512: at "SYS.DBMS_WORKLOAD_REPLAY", line 1799 ORA-06512: at line 2 3)
exec DBMS_WORKLOAD_REPLAY.INITIALIZE_REPLAY('TEST1','CAPT');
ERROR at line 1: ORA-20223: Error: Invalid Input. Replay "TESTWWW" is already in progress! ORA-06512: at "SYS.DBMS_WORKLOAD_REPLAY", line 2157 ORA-06512: at "SYS.DBMS_WORKLOAD_REPLAY", line 2185 ORA-06512: at line 1
A Database Replay is already in progress in the database.
ORA-20223: Error: Invalid Input.
Capture's last processed version (11.1.0.7.0) does not match the current database version (11.2.0.1.0) 5)
SQL> begin
2 dbms_workload_replay.initialize_replay( 3 replay_name=>'UPGRADETEST', 4 replay_dir=>'TEST'); 5 end; 6 / begin * ERROR at line 1: ORA-20223: Error: Invalid Input. Directory "TEST" does not contain a valid processed workload capture ORA-06512: at "SYS.DBMS_WORKLOAD_REPLAY", line 817 ORA-06512: at line 2 6) ORA-20223: Error: Invalid Input. Replay "TEST_REPLAY" is already in progress! Resolved by running following:
execute DBMS_WORKLOAD_REPLAY.cancel_replay() 7) This error can occur in RAC environment:
SQL> exec DBMS_WORKLOAD_REPLAY.PREPARE_REPLAY();
BEGIN DBMS_WORKLOAD_REPLAY.PREPARE_REPLAY(); END; * ERROR at line 1: ORA-20223: Invalid input. Directory "REPLAY1" does not contain a valid processed workload capture ORA-6512: at "SYS.DBMS_WORKLOAD_REPLAY", line 4132 ORA-6512: at line 1 Replay on RAC using local replay directory fails even though mappings are all to the one node. Failure is due to insert being parallel and slaves starting on remote node and hence cannot see replay directory. Solution: set parallel_force_local = true or Use a shared directory instead of a local directory.
ORA-39087 "directory name %s is invalid"When attempting to implement a Grid Control AWR export after capturing a replay, the following error occurs:
ORA-12012: error on auto execute of job 579000
ORA-20115: datapump export encountered error: ORA-39001: invalid argument value ORA-39000: bad dump file specification ORA-39087: directory name WRR_TMP is invalid ORA-06512: at "SYS.DBMS_WORKLOAD_CAPTURE", line 1533 ORA-06512: at line 1
select ID,NAME,DIRECTORY ,AWR_DBID,AWR_BEGIN_SNAP,AWR_END_SNAP,AWR_EXPORTED from dba_workload_captures
exec dbms_workload_capture.export_awr(capture_id); This will create wcr_ca.dmp Move wcr_ca.dmp to /u02/oradata/expimp/cap/ Import the AWR to the replay database via set serverout on begin dbms_output.put_line('Imported DBID = ' || dbms_workload_capture.import_awr(captureid,'stageschema')); end; / ORA-21500: internal error code, arguments:[keccuCheckOCIError]When running workload replay, the following error is dumped:
wrc userid=system password=ss replaydir='/fenix_pruebas/wrc' WORKDIR='/fenix_pruebas/wrc/trace' debug=ON CONNECTION_OVERRIDE=TRUE MODE=GET_TABLES
Workload Replay Client: Release 11.2.0.3.0 - Production on Wed Apr 25 13:20:24 2012 Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved. List of objects referenced by the captured statements: ------------------------------------------------------ Errors in file : ORA-21500: internal error code, arguments: [keccuCheckOCIError], [keccuGetCapturedTablesExtractObjects:3], [12899], [ORA-12899: value too large for column "SYS"."WRR$_GCT_OBJECTS"."NAME" (actual: 41, maximum: 30) ORA-06512: at line 1 ORA-06512: at line 1 Solution is to apply the fix for Bug 13399236 which is fixed in 12.1. If there is no patch available for your version, please request a one off patch be produced. See:
Document 13399236.8 Bug 13399236 - wrc mode=get_tables errors out with ORA-21500 / ORA-12899
Timeout is called1) The following message is in the WRC trace:
2012-06-11 15:30:44.391227 :kecld.c@1193: Dispatcher should sleep 853 ms for the next login. This is considered a normal message but is indicative of an issue likely unrelated to WRC. To further diagnose the issue, run the scripts from following note:
Document 760402.1 SCRIPTS TO DEBUG SLOW REPLAY
2) There is another timeout message that is considered normal but received due to the high capture process time:
2012-06-14 14:49:41.614224 :kecld.c@1744: Timeout is called For example, if the capture process is taken for days,the replay will take longer period of time and may time out. In looking at the Replay report, it may be seen that processes are still running, but progress is slow due to the size of the capture. It is recommended that Database Replay is started with a smaller duration of capture. As a thumb rule, it is recommend that Database Replay is one hour capture of representative workload. Do not jump directly to a larger duration capture like 12 hour or 24 hour. Once a one hour Database Replay run has worked well to satisfaction, one can move towards a larger duration of Database Replay. To find the offending workload capture file, see:
Document 1536695.1 How to Find the Offending Workload Capture File ( rec file ) when a Replay is Cancelled or Crashes
Please check the following document for a list of available patches for different releases:
Document 560977.1 Using Real Application Testing Functionality in Earlier releases
ReferencesNOTE:1536695.1 - How to Find the Offending Workload Capture File ( rec file ) when a Replay is Cancelled or CrashesNOTE:560977.1 - Using Real Application Testing Functionality in Earlier Releases NOTE:1536588.1 - DBMS_WORKLOAD_REPLAY "Cancels Itself" When Sessions Include "Migrated Sessions" NOTE:1536143.1 - Troubleshooting: Slow DBMS_Workload_Replay.Process_Capture |
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/17252115/viewspace-1332467/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Using Workload Capture and Replay (文件 ID 445116.1)APT
- Oracle Database ReplayOracleDatabase
- oracle rat database replayOracleDatabase
- database replay基礎學習Database
- 資料庫負荷重放(Database replay)資料庫Database
- 11g Database Replay使用詳解Database
- Oracle 11g Database Replay 實驗OracleDatabase
- Oracle Database Change Data Capture featureOracleDatabaseAPT
- Oracle OCP IZ0-053 Q692(Workload Capture and Replay)OracleAPT
- Oracle 資料庫重放(Database Replay)功能演示Oracle資料庫Database
- 執行database replay進行升級測試Database
- Oracle OCP 1Z0 053 Q479(Workload Capture&Replay)OracleAPT
- Ten Reasons Why Android Should Support OpenCLAndroid
- Oracle OCP 1Z0 053 Q409(Workload Capture&Replay)OracleAPT
- Oracle OCP 1Z0 053 Q410(Workload Capture&Replay)OracleAPT
- Oracle OCP 1Z0-053 Q137(Workload Capture&Replay)OracleAPT
- AIX: High Swap Usage Or ORA-4030 Errors (文件 ID 1599824.1)AIError
- Three Reasons To Consider Being a Test DeveloperIDEDeveloper
- DATABASE REPLAY加壓播放引數之SCALE_UP_MULTIPLIERDatabase
- Quick Reference to RDBMS Database Patchset Patch Numbers (文件 ID 753736.1)UIDatabase
- Get Proactive - Oracle Database 診斷工具 (文件 ID 1564582.1)OracleDatabase
- Information On Installed Database Components and Schemas (文件 ID 472937.1)ORMDatabase
- Oracle Common Function Library 參考文件OracleFunction
- Master Note: Overview of Database ControlFiles (文件 ID 1493674.1)ASTViewDatabase
- How to Collect Diagnostics for Database Hanging Issues (文件 ID 452358.1)Database
- Resource Manager Enhancements in Oracle Database 11g (文件 ID 884082.1)OracleDatabase
- How to Create or Remove Restore Point on Standby database (文件 ID 1672977.1)REMRESTDatabase
- Local Capture and Downstream CaptureAPT
- PSU下載 - Oracle Recommended Patches -- Oracle Database (文件 ID 756671.1)OracleDatabase
- How to Move a Database Using Transportable Tablespaces (文件 ID 1493809.1)Database
- Use Database Replay Feature to Help With Upgrade From 10.2.0.4 to 11g_748895.1Database
- PHP歷理 ICbA的database.php和common.phpPHPDatabase
- Database Startup Fails with ORA-01113, ORA-01110 errors (Doc ID 146039.1)DatabaseAIError
- Oracle Database 12C 新功能 rman RECOVER TABLE (文件 ID 2047644.1)OracleDatabase
- Upgrade Advisor: Database from 10.2 to 11.2 (文件 ID 251.1)Database
- 11g oracle database installation with oracle grid infrastructure on linux(文件)OracleDatabaseASTStructLinux
- TcpreplayTCP
- Ora-12720 During Rman Duplication Of Database (文件 ID 341089.1)Database