SRDC - ORA-1555: Query Duration 0: Checklist of Evidence to Supply (Doc ID 1682704.1)

Action Plan

1. Execute srdc_db_undo_1555-1.sql as sysdba and provide the spool output DB_Undo_1555-1.html  以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 (用于非分区表)或  srdc_db_analyze_partition.sql (用于分区表)分析表

--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:  如果错误是可重现的

Set the follwing traces:  设置以下跟踪

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:  如果错误无法重现

Set the follwing traces:

SQL> CONN / AS SYSDBA
SQL> ALTER SYSTEM SET EVENTS ‘1555 trace name errorstack level 12‘;
SQL> ALTER SYSTEM SET EVENTS ‘10442 trace name context forever, level 10‘;
SQL> ALTER SYSTEM set MAX_DUMP_FILE_SIZE= unlimited ;
SQL> ALTER SYSTEM set TIMED_STATISTICS = true;
Wait until the error (ORA-1555) occurs again .
--等待直到再次出现错误(ORA-1555)
Note: When the ALTER SYSTEM SET EVENTS command is used , only new sessions will be impacted by the events set by this command.
--注意:使用ALTER SYSTEM SET EVENTS命令时,此命令设置的事件只会影响新的会话
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.

原文地址:https://www.cnblogs.com/zylong-sys/p/11961910.html

时间: 2024-10-27 07:59:32

SRDC - ORA-1555: Query Duration 0: Checklist of Evidence to Supply (Doc ID 1682704.1)的相关文章

Error:dijit.tree.TreeStoreModel:root query returned 0 items

1.错误描写叙述 error loading root:                                            Tree.js(第341行) Error:dijit.tree.TreeStoreModel:root query returned 0 items,but must return exactly one.                                            TreeStoreModel.js(第24行) 2.错误原因

Outer Join Query Over Dblink Can Fail With ORA-904 (Doc ID 730256.1)

Outer Join Query Over Dblink Can Fail With ORA-904 (Doc ID 730256.1) To Bottom Modified:03-May-2013Type:PROBLEM In this Document   Symptoms   Changes   Cause   Solution   References APPLIES TO:Oracle Database - Enterprise Edition - Version 10.2.0.1 t

High Waits On Real-time Descriptor Latch From 12.1.0.1 (Doc ID 2382299.1)

  Copyright (c) 2020, Oracle. All rights reserved. Oracle Confidential.   High Waits On Real-time Descriptor Latch From 12.1.0.1 (Doc ID 2382299.1) To Bottom In this Document   Symptoms   Changes   Cause   Solution APPLIES TO: Oracle Database Exadata

ORA-01555 When Max Query Length Is Less Than Undo Retention, small or 0 Seconds (Doc ID 1131474.1)

APPLIES TO: Oracle Database - Enterprise Edition - Version 10.2.0.1 to 11.2.0.2 [Release 10.2 to 11.2]Oracle Database - Enterprise Edition - Version 11.2.0.3 to 11.2.0.4 [Release 11.2]Oracle Database - Enterprise Edition - Version 12.1.0.2 to 12.1.0.

实战:Oracle10.2.0.4异机迁移并升级到Oracle 11.2.0.4

环境: 源库:192.168.8.132   oracle10.2.0.4 目标库:192.168.8.133 oracle11.2.0.4 OS:linux 5.4-64位 将原10G的库迁移到新主机133上面,数据库版本同时升级为11.2.0.4 主要步骤: 一.环境检查(源库) 1.将11g中的utlu112i.sql,cp到源主机上,进行升级检查: 2.通过dbupgdiag.sql脚本来检查源库的一致性,如果有无效对象,@utlrp.sql可以对其进行重编译 3.对源库进行备份 二.迁

Gathering Initial Troubleshooting Information for Analysis of ORA-4031 Errors on the Shared Pool

In this Document   Purpose   Troubleshooting Steps   References APPLIES TO: Oracle Database - Enterprise Edition - Version 8.0.6.3 and later Information in this document applies to any platform. PURPOSE The purpose of this document is to provide some

Oracle 通过ADR工具 收集ORA-600错误信息

 问题描述: 2014-06-10 在点检数据库预警文件时,出现Ora -00600 错误,并且Rman L1 备份失败,查询相关资料,得知是Bug:9835218.于是,提SR寻求Oracle 官方技术支持. Oracle回复如下: Your Service Request has been submitted as anORA-600/ORA-7445 issue based on the problem type you chose when logging the SR. Additio

Mysql开发实践8问,你能hold住几个?

最近项目对DB依赖比较重,梳理了这段时间使用Mysql遇到的8个比较具有代表性的问题,答案也比较偏开发实践,没有DBA专业和深入,有出入的请使劲拍砖!... 1.Mysql读写性能是多少,有哪些性能相关的配置参数? 2.Mysql负载高时,如何找到是由哪些SQL引起的? 3.如何针对具体的SQL做优化? 4.SQL层面已难以优化,请求量继续增大时的应对策略? 5.Mysql如何做主从数据同步? 6.如何防止DB误操作和做好容灾? 7.该选择Mysql哪种存储引擎,Innodb具有什么特性? 8.

Oracle EBS R12 (12.1.3) Installation Linux(64 bit)

Oracle EBS R12 (12.1.3) Installation Linux(64 bit) Contents Objective. 3 1 Download & Unzip. 3 Download. 3 Unzip. 3 MD5 Checksums. 4 2 Pre-Install Task. 5 Disk Space. 5 Specific Software Requirements. 5 RPM... 6 JDK. 8 OS User & Group. 11 3 Instal