SRDC - ORA-1555: Query Duration 0: Checklist of Evidence to Supply (Doc ID 1682704.1)
Action Plan
The Execute 1. srdc_db_undo_1555-1.sql AS sysdba and the Provide the Output DB_Undo_1555-1.html at The spool executed as sysdba
--srdc_db_undo_1555-1.sql REM srdc_db_undo_1555-1.sql REM collect collect Undo parameters and Segments details. define SRDCNAME='DB_Undo_1555-1' set pagesize 200 verify off sqlprompt "" term off entmap off echo off set markup html on spool on COLUMN SRDCSPOOLNAME NOPRINT NEW_VALUE SRDCSPOOLNAME select 'SRDC_'||upper('&&SRDCNAME')||'_'||upper(instance_name)||'_'|| to_char(sysdate,'YYYYMMDD_HH24MISS') SRDCSPOOLNAME from v$instance; spool &&SRDCSPOOLNAME..htm select 'Diagnostic-Name : ' "Diagnostic-Name ", '&&SRDCNAME' "Report Info" from dual union all select 'Time : ' , to_char(systimestamp, 'YYYY-MM-DD HH24MISS TZHTZM' ) from dual union all select 'Machine : ' , host_name from v$instance union all select 'Version : ',version from v$instance union all select 'DBName : ',name from v$database union all select 'Instance : ',instance_name from v$instance / set echo on --***********************Undo Extents breakdown information*********************** select status, count(*) cnt from dba_rollback_segs group by status / col segment_name format a30 head "Segment Name" col "ACT BYTES" format 999,999,999,999 head "Active Bytes" col "UNEXP BYTES" format 999,999,999,999 head "Unexpired Bytes" col "EXP BYTES" format 999,999,999,999 head "Expired Bytes" select segment_name, nvl(sum(act),0) "ACT BYTES", nvl(sum(unexp),0) "UNEXP BYTES", nvl(sum(exp),0) "EXP BYTES" from (select segment_name, nvl(sum(bytes),0) act,00 unexp, 00 exp from dba_undo_extents where status='ACTIVE' group by segment_name union select segment_name, 00 act, nvl(sum(bytes),0) unexp, 00 exp from dba_undo_extents where status='UNEXPIRED' group by segment_name union select segment_name, 00 act, 00 unexp, nvl(sum(bytes),0) exp from dba_undo_extents where status='EXPIRED' group by segment_name) group by segment_name order by 1 / select distinct status st, count(*) "HOW MANY", sum(bytes) "SIZE" from dba_undo_extents group by status / select SEGMENT_NAME, TABLESPACE_NAME, EXTENT_ID, FILE_ID, BLOCK_ID, BYTES, BLOCKS, STATUS from dba_undo_extents order by 1,3,4,5 / ---***********************Undo Extents Contention breakdown*********************** -- Take out column TUNED_UNDORETENTION if customer -- prior to 10.2.x -- -- The time frame can be adjusted with this query -- By default using around 4 hour window of time -- -- Ex. -- Using sysdate-.04 looking at the last hour -- Using sysdate-.1 looking at the last 4 hours -- Using sysdate-.32 looking at the last 8 hours -- Using sysdate-1 looking at the last 24 hours select inst_id, to_char(begin_time,'MM/DD/YYYY HH24:MI') begin_time, UNXPSTEALCNT, EXPSTEALCNT , SSOLDERRCNT, NOSPACEERRCNT, MAXQUERYLEN, TUNED_UNDORETENTION, TUNED_UNDORETENTION/60/60 hours from gv$undostat where begin_time between (sysdate-.1) and sysdate order by inst_id, begin_time / set echo off set sqlprompt "SQL> " term on set verify on spool off set markup html off spool off
2. Analyze the table using srdc_db_analyze_table.sql (for non partitioned tables) or srdc_db_analyze_partition.sql (for partitioned tables). Upload the spool output.
2. srdc_db_analyze_table.sql (for the non-partitioned table) or srdc_db_analyze_partition.sql (for partition table) analysis table
--srdc_db_analyze_table.sql REM srdc_db_analyze_table.sql REM To identify corrupted row(s) in a LOB segment define SRDCNAME='DB_Analyze_Table' set pagesize 200 verify off term off entmap off echo off set markup html on spool on COLUMN SRDCSPOOLNAME NOPRINT NEW_VALUE SRDCSPOOLNAME select 'SRDC_'||upper('&&SRDCNAME')||'_'||upper(instance_name)||'_'|| to_char(sysdate,'YYYYMMDD_HH24MISS') SRDCSPOOLNAME from v$instance; spool &&SRDCSPOOLNAME..htm select 'Diagnostic-Name : ' "Diagnostic-Name ", '&&SRDCNAME' "Report Info" from dual union all select 'Time : ' , to_char(systimestamp, 'YYYY-MM-DD HH24MISS TZHTZM' ) from dual union all select 'Machine : ' , host_name from v$instance union all select 'Version : ',version from v$instance union all select 'DBName : ',name from v$database union all select 'Instance : ',instance_name from v$instance / set echo on set term on ACCEPT table_name CHAR PROMPT 'Table Name :' ACCEPT table_owner CHAR PROMPT 'Table Owner :' set term off set serveroutput on analyze table &&table_owner..&&table_name validate structure cascade / --**** Execute the script again, if you want to analyze another table**** spool off set markup html off spool off set term on PROMPT PROMPT **** Execute the script again, if you want to analyze another table**** PROMPT PROMPT PROMPT REPORT GENERATED : &SRDCSPOOLNAME..htm set echo off set sqlprompt "SQL> " term on set verify on set echo on
-- srdc_db_analyze_partition.sql REM srdc_db_analyze_partition.sql REM To identify corrupted row(s) in a LOB segment define SRDCNAME='DB_Analyze_Partition' set pagesize 200 verify off term off entmap off echo off set markup html on spool on COLUMN SRDCSPOOLNAME NOPRINT NEW_VALUE SRDCSPOOLNAME select 'SRDC_'||upper('&&SRDCNAME')||'_'||upper(instance_name)||'_'|| to_char(sysdate,'YYYYMMDD_HH24MISS') SRDCSPOOLNAME from v$instance; spool &&SRDCSPOOLNAME..htm select 'Diagnostic-Name : ' "Diagnostic-Name ", '&&SRDCNAME' "Report Info" from dual union all select 'Time : ' , to_char(systimestamp, 'YYYY-MM-DD HH24MISS TZHTZM' ) from dual union all select 'Machine : ' , host_name from v$instance union all select 'Version : ',version from v$instance union all select 'DBName : ',name from v$database union all select 'Instance : ',instance_name from v$instance / -- You must run the script utlvalid.sql from your $ORACLE_HOME/rdbms/admin directory. --The utlvalid.sql script creates the table 'INVALID_ROWS'. --This script should be run as the same user who is issuing the analyze command. drop table INVALID_ROWS / @?/rdbms/admin/utlvalid.sql / set echo on set term on ACCEPT table_owner CHAR PROMPT 'Table Owner :' ACCEPT table_name CHAR PROMPT 'Table Name :' ACCEPT partition_name CHAR PROMPT 'Partition Name :' set term off set serveroutput on analyze table &&table_owner..&&table_name partition (&&partition_name) validate structure cascade into invalid_rows / --**** Execute the script again, if you want to analyze another partition**** spool off set markup html off spool off set term on PROMPT PROMPT Execute the script again, if you want to analyze another partition PROMPT PROMPT PROMPT REPORT GENERATED : &SRDCSPOOLNAME..htm set echo off set sqlprompt "SQL> " term on set verify on set echo on
3. If the error is reproducible: If the error is reproducible
Set the follwing traces: Set the following tracking
SQL> conn / as sysdba SQL> ALTER SESSION SET EVENTS '1555 trace name errorstack level 12'; SQL> ALTER SESSION SET EVENTS '10442 trace name context forever, level 10'; SQL> ALTER SESSION set MAX_DUMP_FILE_SIZE= unlimited ; SQL> ALTER SESSION set TIMED_STATISTICS = true; SQL> ALTER SESSION set TRACEFILE_IDENTIFIER = "ORA-1555"; ... Reproduce the error --重现错误 SQL> ALTER SESSION SET EVENTS '1555 trace name errorstack off'; SQL> ALTER SESSION SET EVENTS '10442 TRACE NAME CONTEXT OFF’;
Then upload the resulting trace file from the directory specified by user_dump_dest or the diagnostic_dest parameter .
4. If the error is not reproducible: If you can not reproduce the error
Set the follwing traces:
The SQL> CONN / the AS the SYSDBA the SQL> the ALTER the SYSTEM the SET the EVENTS '1555 the trace name errorstack Level 12 is'; the SQL> the ALTER the SYSTEM the SET the EVENTS '10442 the trace name context Forever, Level 10'; the SQL> the ALTER the SYSTEM SET MAX_DUMP_FILE_SIZE = Unlimited; the SQL> the ALTER = to true the SET TIMED_STATISTICS the SYSTEM; the wait an until at The error (ORA-1555) occurs again. - wait until the error (ORA-1555) again Note: When the ALTER SYSTEM SET EVENTS command is used, only new sessions will be impacted by the . events the sET by the this the command - Note: use ALTER SYSTEM sET eVENTS command, this command sets the event will only affect new session SQL> ALTER SYSTEM sET eVENTS '1555 trace name errorstack off';
Then upload the resulting trace file from the directory specified by user_dump_dest or the diagnostic_dest parameter .
5. Attach all of the above evidence to the Service Request at SR creation time. The evidence can all be placed into a single ZIP or similar compressed archive or can be attached as separate files.