ORA-20011 ORA-29913 and ORA-29400错误的说明_MySQL, Oracle及数据库讨论区_Weblogic技术|Tuxedo技术|中间件技术|Oracle论坛|JAVA论坛|Linux/Unix技术|hadoop论坛_联动北方技术论坛  
网站首页 | 关于我们 | 服务中心 | 经验交流 | 公司荣誉 | 成功案例 | 合作伙伴 | 联系我们 |
联动北方-国内领先的云技术服务提供商
»  游客             当前位置:  论坛首页 »  自由讨论区 »  MySQL, Oracle及数据库讨论区 »
总帖数
1
每页帖数
101/1页1
返回列表
0
发起投票  发起投票 发新帖子
查看: 3650 | 回复: 0   主题: ORA-20011 ORA-29913 and ORA-29400错误的说明        下一篇 
johnnyfox
注册用户
等级:新兵
经验:41
发帖:90
精华:0
注册:2011-12-12
状态:离线
发送短消息息给johnnyfox 加好友    发送短消息息给johnnyfox 发消息
发表于: IP:您无权察看 2015-3-31 12:02:13 | [全部帖] [楼主帖] 楼主

后台alert报以下信息:

 DBMS_STATS: GATHER_STATS_JOB encountered errors.  Check the trace file.
Errors in file /u01/app/oracle/diag/rdbms/*/*/trace/odb_j000_9479.trc:


ORA-20011: Approximate NDV failed: ORA-29913: 执行 ODCIEXTTABLEOPEN 调出时出错

 KUP-11024: This external table can only be accessed from within a Data Pump job.


对ORA-20011 ORA-29913 and ORA-29400 with Associated KUP-XXXXX Errors from DBMS_STATS.GATHER_STATS_JOB 的相关信息进行了整理。

APPLIES TO
Oracle Server - Standard Edition - Version 11.2.0.2 and later
Oracle Server - Enterprise Edition - Version 11.2.0.2 and later
Oracle Server - Personal Edition - Version 11.2.0.2 and later
Information in this document applies to any platform.
SYMPTOMS
The key identifiers in these cases are typically the following:
DBMS_STATS is being executed in some form
ORA-20011, ORA-29913 and ORA-29400 Errors are seen, ORA-29913 specifying external function "ODCIEXTTABLEOPEN" signifying that there was an error in the callout by the external function "ODCIEXTTABLEOPEN " while trying to open an external table.
Some specific examples follow:
When attempting to run GATHER_STATS_JOB the following errors occur:
ORA-20011: Approximate NDV failed:ORA-29913: error in executing ODCIEXTTABLEOPEN callout
ORA-29400: data cartridge error
usually accompanied with varying other errors such as:
KUP-11024: This external table can only be accessed from within a Data Pump job and others.
Note: With cases where the file was not found in the directory specified raising:
KUP-04040: file %s in %s not found
See:
Document 150737.1 ORA-29913, ORA-29400, KUP-04040 While Selecting from External Table
Document 1290722.1 "KUP-04040: file timezdif.csv in TIMEZDIF_DIR not found " logged by GATHER_STATS_JOB in alert.log after upgrade
Document 1305127.1 KUP-04040: file TRCA_CONTROL.txt in TRCA$STAGE not found
Alternatively you may get text in the trace file like:
*** 2012-09-10 05:00:11.921
DBMS_STATS: GATHER_STATS_JOB: GATHER_TABLE_STATS('"SH"','"SALES_TRANSACTIONS_EXT"','""', ...)
DBMS_STATS: ORA-20011: Approximate NDV failed: ORA-29913: error in executing ODCIEXTTABLEOPEN callout
ORA-29400: data cartridge error
error opening file ../demo/schema/log/ext_1v3.log
CAUSE
The primary cause of this issue is that an external table existed at some point in time but does not now. However, the database still believes the table exists since the dictionary information about the object has not been modified to reflect the change. When DBMS_STATS is run against the table in question, it makes a call out to the external table which fails because the object is not there.
There are many reasons that an external table may not exist including:
Temporary Datapump external tables have not been cleaned up properly. The dictionary information should have been dropped when the DataPump jobs completed.
An External table has been removed without clearing up the corresponding data dictionary information. For example: Oracle Demo Schema Tables such as the external table “SALES_TRANSACTIONS_EXT” may have been removed but the dictionary has not been updated to reflect this. The "SALES_TRANSACTIONS_EXT" table is an external table in the "SH" schema which is one of Demo Schema provided by Oracle.
SOLUTION
Essentially the solution to this issue is to clean up the orphaned dictionary entries. Different solutions are appropriate dependent on the exact nature of the primary cause and these are outlined below:
Temporary Datapump External Table
Ensure that there are no DataPump jobs running at the same time as the DBMS_STATS job (this is to avoid any potential complications associated with cleaning up at the same time as someting else is running).
Check and clean up orphaned DataPump jobs. Both above steps can be done by following note:
Note:336014.1 How To Cleanup Orphaned DataPump Jobs In DBA_DATAPUMP_JOBS ?
Identify external tables. To do this, Run the following as SYSDBA in SQL*Plus
spool obj.out
set linesize 200 trimspool on
set pagesize 2000
col owner form a30
col created form a25
col last_ddl_time form a25
col object_name form a30
col object_type form a25
select OWNER,OBJECT_NAME,OBJECT_TYPE, status,
to_char(CREATED,'dd-mon-yyyy hh24:mi:ss') created
,to_char(LAST_DDL_TIME , 'dd-mon-yyyy hh24:mi:ss') last_ddl_time
from dba_objects
where object_name like 'ET$%'
/
select owner, TABLE_NAME, DEFAULT_DIRECTORY_NAME, ACCESS_TYPE
from dba_external_tables
order by 1,2
/
spool off
Correlate the information from DBA_OBJECTS and DBA_EXTERNAL TABLES above to identify the temporary external tables that belong to the DataPump.
Drop the temporary external tables that belong to the DataPump. eg:
SQL> drop table system.&1 purge;
Enter value for 1: ET$00654E1E0001
old 1: drop table system.&1 purge
new 1: drop table system.ET$00654E1E0001 purge
Other External Table
With cases where specific External tables (be they Demo Schema tables or other tables) are missing, the process for handling them is much the same and can be resolved by following the procedures below. For example, if the additional error is 'error opening file ../demo/schema/log/ext_1v3.log', then this indicates that there is a problem opening or locating the log file from the demo schema directory. The implication is that the demo tables have not been cleared up correctly:
Try to locate the files for these tables in their directory. It may be that the files still exist but they have just been renamed or re-located. If that is the case you can correct the location to avoid the problem. If the file has been removed then follow either the following steps:
Lock the statistics on these tables by using the following command:
DBMS_STATS.LOCK_TABLE_STATS ('ownname','tabname');
(This step prevents DBMS_STATS from gathering against the missing table)
AND/OR
Remove the table.  For example if the "SALES_TRANSACTIONS_EXT" Demo table is missing you would use :
DROP TABLE SALES_TRANSACTIONS_EXT;


--转自 北京联动北方科技有限公司




赞(0)    操作        顶端 
总帖数
1
每页帖数
101/1页1
返回列表
发新帖子
请输入验证码: 点击刷新验证码
您需要登录后才可以回帖 登录 | 注册
技术讨论