数据库版本
SQL> select * from v$version;
BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
PL/SQL Release 11.2.0.4.0 - Production
CORE 11.2.0.4.0 Production
TNS for Linux: Version 11.2.0.4.0 - Production
NLSRTL Version 11.2.0.4.0 - Production
问题出现
执行expdp时出现错误
[oracle@acarsorcl-primary ogg]$ expdp exp/oracle schemas=ogg dumpfile=ogg.DMP directory=dir_exp
Export: Release 11.2.0.4.0 - Production on Fri Jul 15 20:41:00 2016
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
ORA-39006: internal error
ORA-39213: Metadata processing is not available
之前数据库修改过字符集,测试了下只要修改字符集都会出现这个问题,如何修改字符集可以查看之前的blog
http://blog.youkuaiyun.com/dbdoctor/article/details/51909047
解决办法
sys登录执行如下代码
SQL> conn / as sysdba
Connected.
SQL> exec dbms_metadata_util.load_stylesheets;
PL/SQL procedure successfully completed.
验证
[oracle@acarsorcl-primary trace]$ expdp exp/oracle schemas=ogg dumpfile=ogg.DMP directory=dir_exp
Export: Release 11.2.0.4.0 - Production on Fri Jul 15 20:45:19 2016
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
FLASHBACK automatically enabled to preserve database integrity.
Starting "EXP"."SYS_EXPORT_SCHEMA_01": exp/******** schemas=ogg dumpfile=ogg.DMP directory=dir_exp
Estimate in progress using BLOCKS method...
Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
Total estimation using BLOCKS method: 64 KB
Processing object type SCHEMA_EXPORT/USER
Processing object type SCHEMA_EXPORT/SYSTEM_GRANT
Processing object type SCHEMA_EXPORT/ROLE_GRANT
Processing object type SCHEMA_EXPORT/DEFAULT_ROLE
Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
Processing object type SCHEMA_EXPORT/TABLE/TABLE
. . exported "OGG"."EMP" 8.562 KB 14 rows
Master table "EXP"."SYS_EXPORT_SCHEMA_01" successfully loaded/unloaded
******************************************************************************
Dump file set for EXP.SYS_EXPORT_SCHEMA_01 is:
/u01/ogg.DMP
Job "EXP"."SYS_EXPORT_SCHEMA_01" successfully completed at Fri Jul 15 20:45:24 2016 elapsed 0 00:00:05
在执行expdp时遇到ORA-39006内部错误,该问题与数据库字符集修改有关。通过登录数据库为sys用户并执行特定代码来解决问题。之前的文章提供了修改字符集的详情。
54

被折叠的 条评论
为什么被折叠?



