Monday, May 9, 2016

Statistics over external tables


On one Oracle server, I've encountered following part of alert.log

DBMS_STATS: GATHER_STATS_JOB encountered errors.  Check the trace file.
Errors in file C:\APP\diag\rdbms\dev\dev\trace\dev_j002_6004.trc:
ORA-20011: Approximate NDV failed: ORA-29913: error in executing ODCIEXTTABLEOPEN callout
ORA-29400: data cartridge error
KUP-04040: file test.txt in EXT_DIR not found

Reason for this error is that DBMS_STATS is tried to be executed over external table - which is all ok - since it is possible to run DBMS_STATS package over external table - but it seems that this external table is bad, since it is missing its file on OS.

And my presumption proves true. I have found that EXT_DIR Oracle directory is pointing to the Windows directory C:\TEMP\utf8load and that there is no test.txt file, and that there is external table (by looking at DBA_EXTERNAL_TABLES view) which is created over that file.

For more information about managing external tables in Oracle 11gR2 look at the following document:

https://docs.oracle.com/cd/E18283_01/server.112/e17120/tables013.htm

No comments:

Post a Comment