Friday, August 2, 2013

EXP-00091: Exporting questionable statistics

Getting following error while performing a schema export as follows
$ exp / owner=WEBADMIN  direct=y file=$DMP_FILE log=$EXPORT_DIR/$EXPORT_LOG 2>&1

Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Export done in US7ASCII character set and AL16UTF16 NCHAR character set
server uses AL32UTF8 character set (possible charset conversion)

About to export specified users ...
. exporting pre-schema procedural objects and actions
. exporting foreign function library names for user WEBADMIN
. exporting PUBLIC type synonyms
. exporting private type synonyms
. exporting object type definitions for user WEBADMIN
About to export WEBADMIN's objects ...
. exporting database links
. exporting sequence numbers
. exporting cluster definitions
. about to export WEBADMIN's tables via Direct Path ...
. . exporting table                  ALL_DATABASES       1232 rows exported
EXP-00091: Exporting questionable statistics.
. . exporting table                    APPLICATION        578 rows exported
EXP-00091: Exporting questionable statistics.
. . exporting table               APPLICATION_BKUP        449 rows exported
EXP-00091: Exporting questionable statistics.
…………
. exporting refresh groups and children
. exporting dimensions
. exporting post-schema procedural objects and actions
. exporting statistics
Export terminated successfully with warnings.

We can look at oerr about this error

madrman001:oracle:prman:/backup/prman/webadmin: oerr exp 00091
00091, 00000, "Exporting questionable statistics."
// *Cause:  Export was able export statistics, but the statistics may not be
//          usuable. The statistics are questionable because one or more of
//          the following happened during export: a row error occurred, client
//          character set or NCHARSET does not match with the server, a query
//          clause was specified on export, only certain partitions or
//          subpartitions were exported, or a fatal error occurred while
//          processing a table.
// *Action: To export non-questionable statistics, change the client character
//          set or NCHARSET to match the server, export with no query clause,
//          export complete tables. If desired, import parameters can be
//          supplied so that only non-questionable statistics will be imported,
//          and all questionable statistics will be recalculated.


Beginning with Oracle 9i by default export attempts to include statistics in the export. But the export will still generate the warning message about the questionable statistics in one of the following cases even if using STATISTICS=ESTIMATE / COMPUTE
1. There are row errors while exporting
2. The client character set or NCHAR character set does not match the server character set or NCHAR character set (the NLS_LANG is different than the database character set for example).
3. A QUERY clause is specified
4. Only certain partitions or subpartitions are exported.
The situation in case 2 is the most frequent and can be solved by setting the NLS_LANG character set of the client to the character set of the database.

Modified script as follows and completed export
export NLS_LANG=.AL32UTF8

The Oracle base for ORACLE_HOME=/orasw/prman/app/oracle/product/11.2.0/db is /orasw/prman/app/oracle

Export: Release 11.2.0.3.0 - Production on Wed Jul 10 09:30:21 2013

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.


Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Export done in AL32UTF8 character set and AL16UTF16 NCHAR character set

About to export specified users ...
. exporting pre-schema procedural objects and actions
. exporting foreign function library names for user WEBADMIN
. exporting PUBLIC type synonyms
. exporting private type synonyms
. exporting object type definitions for user WEBADMIN
About to export WEBADMIN's objects ...
. exporting database links
. exporting sequence numbers
. exporting cluster definitions
. about to export WEBADMIN's tables via Direct Path ...
. . exporting table                  ALL_DATABASES       1232 rows exported
. . exporting table                    APPLICATION        578 rows exported
. . exporting table               APPLICATION_BKUP        449 rows exported
. . exporting table               APPLICATION_JUN1        449 rows exported
-------
. exporting dimensions
. exporting post-schema procedural objects and actions
. exporting statistics
Export terminated successfully without warnings.

No comments:

Post a Comment