Tag Archives: DBMS_STATS

统计信息收集出现DFS等待导致实例HANG死

客户10.2.0.4 RAC环境,出现大量的library cache lock和cursor: pin S wait on X等待,经分析是由于统计信息收集僵死导致的。 数据库在8点到9点期间,数据库两个节点都存在明显的cursor: pin S wait on X和library cache lock的等待: Event Waits Time(s) Avg   Wait(ms) %   Total Call Time Wait   Class cursor:   pin S wait on X 1,573,056 30,651 … Continue reading

Posted in BUG | Tagged , , , , | Leave a comment

ORA-600(ktspfnsb-1)错误

Exadata环境在收集统计信息时出现这个错误。 客户数据库11.2.0.2 RAC on Exadata在收集统计信息是出现的错误: Sun Feb 05 22:22:44 2012 Errors IN file /u01/app/oracle/diag/rdbms/orcl/orcl2/trace/orcl2_j002_21084.trc (incident=255085): ORA-00600: internal error code, arguments: [ktspfnsb-1], [1], [1], [], [], [], [], [], [], [], [], [] Incident details IN: /u01/app/oracle/diag/rdbms/orcl/orcl2/incident/incdir_255085/orcl2_j002_21084_i255085.trc Sun Feb 05 22:22:56 … Continue reading

Posted in BUG | Tagged , , , , , , | Leave a comment

ORA-600(kghpih:ds)错误

9206数据库在收集统计信息时出现这个错误。 错误信息如下: Fri Oct 14 05:00:52 2011 Errors IN file /opt/app/admin/orcl/bdump/orcl2_p010_16736.trc: ORA-00600: internal error code, arguments: [kghpih:ds], [0x494217CE8], [], [], [], [], [], [] Fri Oct 14 05:00:53 2011 Trace dumping IS performing id=[cdmp_20111014050053] Fri Oct 14 05:00:53 2011 Errors … Continue reading

Posted in BUG | Tagged , , , | Leave a comment

10g中DBA_TAB_STATISTICS的STATTYPE_LOCKED列对分区锁定显示为空的解决

Oracle10g的DBA_TAB_STATISTICS视图的STATTYPE_LOCKED列没有正确的显示结果。 10g中DBA_TAB_STATISTICS的STATTYPE_LOCKED列对分区锁定显示为空:https://yangtingkun.net/?p=1023 上文提到了DBA_TAB_STATISTICS中的STATTYPE_LOCKED列在10g中对于分区锁定统计信息显示为空,那么在10g中有没有办法获取到正确的结果呢: SQL> SELECT TABLE_NAME, partition_name, last_analyzed, stattype_locked 2 FROM dba_tab_statistics 3 WHERE owner = USER 4 AND TABLE_NAME = ‘T_PART’; TABLE_NAME PARTITION_NAME LAST_ANAL STATT —————————— —————————— ——— —– T_PART 16-JUL-12 T_PART P1 T_PART P2 16-JUL-12 T_PART PMAX 16-JUL-12 … Continue reading

Posted in ORACLE | Tagged , , , , , | Leave a comment

10g中DBA_TAB_STATISTICS的STATTYPE_LOCKED列对分区锁定显示为空

Oracle10g的DBA_TAB_STATISTICS视图的STATTYPE_LOCKED列没有正确的显示结果。 看一个简单的例子: SQL> SELECT * FROM v$version; BANNER —————————————————————- Oracle DATABASE 10g Enterprise Edition Release 10.2.0.5.0 – 64bi PL/SQL Release 10.2.0.5.0 – Production CORE 10.2.0.5.0 Production TNS FOR Linux: Version 10.2.0.5.0 – Production NLSRTL Version 10.2.0.5.0 – Production SQL> CREATE … Continue reading

Posted in ORACLE | Tagged , , , , | Leave a comment

分区表部分分区不可用导致统计信息收集失效

一个客户碰到的具体需求,分区表中有些分区所在的表空间被OFFLINE,导致在删除统计信息时报错。 下面通过例子来说明这个问题: SQL> CREATE TABLE t_part_read (id NUMBER) 2 partition BY range (id) 3 (partition p1 VALUES less than (10) tablespace ts1, 4 partition p2 VALUES less than (20) tablespace ts2, 5 partition pmax VALUES less than (maxvalue) tablespace users); … Continue reading

Posted in ORACLE | Tagged , , , , , , | Leave a comment

ORA-8103错误

最近碰到两次ORA-8103错误,简单总结一下。 一次是客户的10.2数据库出现了ORA-600[6002]错误,导致的问题是索引出现了逻辑损坏,本来问题很简单,只需要删除索引并重建,或者通过ONLINE REBUILD方式就可以了。但是索引删除后,扫描这张表出现了ORA-8103错误,这说明错误不仅出现在索引上,在数据块上同样存在逻辑错误,从而导致了前面的ORA-600[6002]错误。 第二个问题是11.2.0.2环境中出现的ORA-8103错误,错误发生在统计信息收集过程中: Fri Mar 30 02:00:00 2012 DBMS_STATS: GATHER_STATS_JOB encountered errors. CHECK the trace file. Errors IN file /u01/app/oracle/diag/rdbms/orcl/orcl1/trace/orcl1_j000_25932.trc: ORA-20011: Approximate NDV failed: ORA-08103: object no longer EXISTSFri Mar 30 02:00:00 2012 DBMS_STATS: GATHER_STATS_JOB encountered errors. Check the … Continue reading

Posted in BUG | Tagged , , , , | Leave a comment

客户数据库出现大量cache buffer chains latch

客户产品数据库上午出现了严重的性能问题,简单记录一下问题的诊断和解决过程。 可以看到,数据库的DB TIME已经涨到了非常高的地步,这说明系统正经受着非常严重的性能问题: Snap Id Snap Time Sessions Cursors/Session Begin Snap: 7170 31-3月 -12 08:00:50 395 10.5 End Snap: 7172 31-3月 -12 09:00:27 689 11.7 Elapsed: 59.61 (mins) DB Time: 17,270.93 (mins)   从TOP 5看,等待事件中最明显的是latch: cache buffers chains,从当前系统的状态也可以看到这一点: SQL> SELECT … Continue reading

Posted in ORACLE | Tagged , , , | Leave a comment

11gr2访问V$LOCK视图出现性能问题

在Oracle 11.2.0.3 For Linux X64环境中,碰到这个问题。 检查数据库是否存在锁信息,在查询V$LOCK视图时发现很长时间没有响应,甚至一度认为数据库HANG住: SQL> SELECT * FROM v$lock WHERE TYPE != ‘MR’; ADDR KADDR SID TY ID1 ID2 LMODE REQUEST CTIME BLOCK —————- —————- —- — ——– —- —– ——- —– —– 0000000C5A6AA770 0000000C5A6AA7C8 3405 TO 5124 … Continue reading

Posted in ORACLE | Tagged , , , | Leave a comment

收集统计信息报错ORA-1422

10.2.0.4环境执行DBMS_STATS包时出现ORA-1422错误。 详细错误信息为: SQL> EXECUTE dbms_stats.gather_table_stats(ownname=> USER, tabname=> ‘X$KTFBUE’) BEGIN dbms_stats.gather_table_stats(ownname=> USER, tabname=> ‘X$KTFBUE’); END; ORA-01422: 实际返回的行数超出请求的行数 ORA-06512: 在 "SYS.DBMS_STATS", line 13437 ORA-06512: 在 "SYS.DBMS_STATS", line 13457 ORA-06512: 在 line 2SQL> execute dbms_stats.gather_table_stats(ownname=> USER, tabname=> ‘X$KTFBUE’) begin dbms_stats.gather_table_stats(ownname=> USER, tabname=> ‘X$KTFBUE’); … Continue reading

Posted in BUG | Tagged , , | Leave a comment