标签云
asm恢复 bbed bootstrap$ dul In Memory kcbzib_kcrsds_1 kccpb_sanity_check_2 kfed MySQL恢复 ORA-00312 ORA-00607 ORA-00704 ORA-01110 ORA-01555 ORA-01578 ORA-08103 ORA-600 2131 ORA-600 2662 ORA-600 2663 ORA-600 3020 ORA-600 4000 ORA-600 4137 ORA-600 4193 ORA-600 4194 ORA-600 16703 ORA-600 kcbzib_kcrsds_1 ORA-600 KCLCHKBLK_4 ORA-15042 ORA-15196 ORACLE 12C oracle dul ORACLE PATCH Oracle Recovery Tools oracle加密恢复 oracle勒索 oracle勒索恢复 oracle异常恢复 Oracle 恢复 ORACLE恢复 ORACLE数据库恢复 oracle 比特币 OSD-04016 YOUR FILES ARE ENCRYPTED 勒索恢复 比特币加密文章分类
- Others (2)
- 中间件 (2)
- WebLogic (2)
- 操作系统 (102)
- 数据库 (1,670)
- DB2 (22)
- MySQL (73)
- Oracle (1,532)
- Data Guard (52)
- EXADATA (8)
- GoldenGate (21)
- ORA-xxxxx (159)
- ORACLE 12C (72)
- ORACLE 18C (6)
- ORACLE 19C (14)
- ORACLE 21C (3)
- Oracle 23ai (7)
- Oracle ASM (65)
- Oracle Bug (8)
- Oracle RAC (52)
- Oracle 安全 (6)
- Oracle 开发 (28)
- Oracle 监听 (28)
- Oracle备份恢复 (560)
- Oracle安装升级 (91)
- Oracle性能优化 (62)
- 专题索引 (5)
- 勒索恢复 (78)
- PostgreSQL (18)
- PostgreSQL恢复 (6)
- SQL Server (27)
- SQL Server恢复 (8)
- TimesTen (7)
- 达梦数据库 (2)
- 生活娱乐 (2)
- 至理名言 (11)
- 虚拟化 (2)
- VMware (2)
- 软件开发 (37)
- Asp.Net (9)
- JavaScript (12)
- PHP (2)
- 小工具 (20)
-
最近发表
- ORA-600 krse_arc_complete.4
- Oracle 19c 202410补丁(RUs+OJVM)
- ntfs MFT损坏(ntfs文件系统故障)导致oracle异常恢复
- .mkp扩展名oracle数据文件加密恢复
- 清空redo,导致ORA-27048: skgfifi: file header information is invalid
- A_H_README_TO_RECOVER勒索恢复
- 通过alert日志分析客户自行对一个数据库恢复的来龙去脉和点评
- ORA-12514: TNS: 监听进程不能解析在连接描述符中给出的SERVICE_NAME
- ORA-01092 ORA-00604 ORA-01558故障处理
- ORA-65088: database open should be retried
- Oracle 19c异常恢复—ORA-01209/ORA-65088
- ORA-600 16703故障再现
- 数据库启动报ORA-27102 OSD-00026 O/S-Error: (OS 1455)
- .[metro777@cock.li].Elbie勒索病毒加密数据库恢复
- 应用连接错误,初始化mysql数据库恢复
- RAC默认服务配置优先节点
- Oracle 19c RAC 替换私网操作
- 监听报TNS-12541 TNS-12560 TNS-00511错误
- drop tablespace xxx including contents恢复
- Linux 8 修改网卡名称
标签归档:ORA-20011
ORA-20011 KUP-11024错误分析
数据库alert日志出现ORA-20011 KUP-11024等错误
Thu Sep 22 18:00:31 2016 DBMS_STATS: GATHER_STATS_JOB encountered errors. Check the trace file. Errors in file /u1/oracle/diag/rdbms/xifenfei/xifenfei/trace/xifenfei_j002_2686.trc: ORA-20011: Approximate NDV failed: ORA-29913: error in executing ODCIEXTTABLEOPEN callout KUP-11024: This external table can only be accessed from within a Data Pump job.
从报错的信息看应该是数据库收集统计信息报错(GATHER_STATS_JOB),但是报错原因是由于访问外部表导致,而该外部表很可能和data pump有关系.
查看trace日志
[oracle@xifenfei]$ more /u1/oracle/diag/rdbms/xifenfei/xifenfei/trace/xifenfei_j002_2686.trc Trace file /u1/oracle/diag/rdbms/xifenfei/xifenfei/trace/xifenfei_j002_2686.trc Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options ORACLE_HOME = /u1/oracle/pruduct/11.2.0.3 System name: Linux Node name: xifenfei Release: 2.6.32-220.el6.x86_64 Version: #1 SMP Wed Nov 9 08:03:13 EST 2011 Machine: x86_64 Instance name: xifenfei Redo thread mounted by this instance: 1 Oracle process number: 356 Unix process pid: 2686, image: oracle@xifenfei (J002) *** 2016-09-22 18:00:31.939 *** SESSION ID:(835.16363) 2016-09-22 18:00:31.939 *** CLIENT ID:() 2016-09-22 18:00:31.939 *** SERVICE NAME:(SYS$USERS) 2016-09-22 18:00:31.939 *** MODULE NAME:(DBMS_SCHEDULER) 2016-09-22 18:00:31.939 *** ACTION NAME:(ORA$AT_OS_OPT_SY_10669) 2016-09-22 18:00:31.939 ORA-20011: Approximate NDV failed: ORA-29913: error in executing ODCIEXTTABLEOPEN callout KUP-11024: This external table can only be accessed from within a Data Pump job. *** 2016-09-22 18:00:31.939 DBMS_STATS: GATHER_STATS_JOB: GATHER_TABLE_STATS('"DWDBA"','"ET$012D00070001"','""', ...) DBMS_STATS: ORA-20011: Approximate NDV failed: ORA-29913: error in executing ODCIEXTTABLEOPEN callout KUP-11024: This external table can only be accessed from within a Data Pump job. *** 2016-09-22 18:00:31.960 DBMS_STATS: GATHER_STATS_JOB: GATHER_TABLE_STATS('"DWDBA"','"ET$01D10D4F0001"','""', ...) DBMS_STATS: ORA-20011: Approximate NDV failed: ORA-29913: error in executing ODCIEXTTABLEOPEN callout KUP-11024: This external table can only be accessed from within a Data Pump job.
通过trace文件,我们已经可以明确是由于数据库对DWDBA.ET$012D00070001和DWDBA.ET$01D10D4F0001这两个表收集统计信息时候报的上述alert日志中看到的错误.
查询数据库记录
SYS@xifenfei>select OWNER,OBJECT_NAME,OBJECT_TYPE, status, 2 to_char(CREATED,'dd-mon-yyyy hh24:mi:ss') created 3 ,to_char(LAST_DDL_TIME , 'dd-mon-yyyy hh24:mi:ss') last_ddl_time 4 from dba_objects 5 where object_name like 'ET$%' 6 / OWNER OBJECT_NAME OBJECT_TYPE STATUS CREATED LAST_DDL_TIME --------- ---------------- ------------ ------- ------------------------- ---------------- DWDBA ET$012D00070001 TABLE VALID 10-mar-2016 16:32:25 10-mar-2016 16:32:25 DWDBA ET$01D10D4F0001 TABLE VALID 10-mar-2016 17:29:29 10-mar-2016 17:29:29 SYS@xifenfei> select owner, TABLE_NAME, DEFAULT_DIRECTORY_NAME, ACCESS_TYPE 2 from dba_external_tables 3 order by 1,2 4 / OWNER TABLE_NAME DEFAULT_DIRECTORY_NAME ACCESS_ ----------- ------------------------------ ------------------------------ ------- DWDBA ET$012D00070001 EXP_FILE_DIR CLOB DWDBA ET$01D10D4F0001 EXP_FILE_DIR CLOB
到这一步,我们已经完全清楚,ET$012D00070001和ET$01D10D4F0001是两个外部表,由于他们的存在使得收集统计信息异常。
分析ET$012D00070001表
SYS@xifenfei>desc DWDBA.ET$012D00070001 Name Null? Type ----------------------------------------------------- -------- ------------------------------------ STORE_NO NUMBER(3) ITEM_NO NUMBER(6) WORK_DATE DATE DIVISION_NO NUMBER(2) SECTION_NO NUMBER(3) SUP_NO NUMBER(6) GRP_NO NUMBER(3) SUBGRP_NO NUMBER(3) USR VARCHAR2(30) TYPE NUMBER(1) ACTIVE_SELL_PRICE NUMBER(8,2) SELL_PRICE NUMBER(8,2) SELL_VAT NUMBER(1) BUY_PRICE NUMBER(10,4) BUY_VAT NUMBER(1) PROMOTION_NO NUMBER(10) PROM_CLASS VARCHAR2(1) PROM_LEVEL NUMBER(1) STOCK NUMBER(10,3) STOCK_ADJ NUMBER(10,3) RECPT NUMBER(10,3) SALES NUMBER(10,3) STOCK_ADJ_AMNT NUMBER(10,2) RECPT_AMNT NUMBER(10,2) SALES_AMNT NUMBER(10,2) PROF_AMNT NUMBER(10,2) COST_CHANGE NUMBER(10,2) DISC NUMBER(10,3) RTN_QTY NUMBER(9,3) DISC_AMNT NUMBER(10,2) RTN_AMNT NUMBER(10,2) LOSS_AMNT NUMBER(10,2) CREATED_DATE DATE COST NUMBER(10,4) NBR_PK NUMBER(5) NBR_VISIT NUMBER(5) NBR_PK_LINE NUMBER(5) N_N_PROF_AMNT NUMBER(9,2) CON_FORE NUMBER(10,2) CON_FORE_OTH NUMBER(10,2) SALES_B NUMBER(10,3) SALES_AMNT_B NUMBER(10,2) SYS@xifenfei>select count(*) from DWDBA.ET$012D00070001; select count(*) from DWDBA.ET$012D00070001 * ERROR at line 1: ORA-29913: error in executing ODCIEXTTABLEOPEN callout KUP-11024: This external table can only be accessed from within a Data Pump job.
通过对ET$012D00070001表查询重新了alert日志一样的错误,可以明确定位问题就是由于该外部表异常导致.通过查询mos,确定Bug 10327346 DBMS_WORKLOAD_CAPTURE does not drop external tables (causing ORA-20011 from DBMS_STATS)可能导致DBMS_WORKLOAD_CAPTURE无法正常清理掉Data pump的外部表导致出现Datapump出现孤立的外部表对象,从而出现该问题.解决方案就是直接drop 相关外部表.也就是这里的(ET$012D00070001和ET$01D10D4F0001)