从oracle 11g导出->12c 导入 ,遇到ORA-39213: Metadata processing is not available

1.从低版本导出,高版本导入,需要增加version 

2.从高版本导出,低版本导入,可以向下兼容。


下面我们来看看《1.从低版本导出,高版本导入》增加version 后,还是报错?


--下面是11g,加了version='11.2.0.3.0'导出

[oracle@C8-DL580-GC-RAC1 dumpfiles]$ expdp unic**/******** directory=orabackupdump dumpfile=expdp_0517_ml_1234.dmp logfile=expdp_0517_ml_1234.log tables=TU_PERMISSION,TU_REL_GROUP_RESOURCE,TU_REL_USER_GROUP,TU_GROUPBASEINFO,TU_USERBASEINFO version='11.2.0.3.0'

Export: Release 11.2.0.3.0 - Production on Tue May 17 15:10:26 2016

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, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
Starting "UNICOMIDMP"."SYS_EXPORT_TABLE_01":  unico**/******** directory=orabackupdump dumpfile=expdp_0517_ml_1234.dmp logfile=expdp_0517_ml_1234.log tables=TU_PERMISSION,TU_REL_GROUP_RESOURCE,TU_REL_USER_GROUP,TU_GROUPBASEINFO,TU_USERBASEINFO version=11.2.0.3.0 
Estimate in progress using BLOCKS method...
Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
Total estimation using BLOCKS method: 20 MB
Processing object type TABLE_EXPORT/TABLE/TABLE
Processing object type TABLE_EXPORT/TABLE/COMMENT
Processing object type TABLE_EXPORT/TABLE/INDEX/INDEX
Processing object type TABLE_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
Processing object type TABLE_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
Processing object type TABLE_EXPORT/TABLE/CONSTRAINT/REF_CONSTRAINT
Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
. . exported "UNICOMIDMP"."TU_GROUPBASEINFO"             7.210 KB       9 rows
. . exported "UNICOMIDMP"."TU_PERMISSION"                23.53 KB     465 rows
. . exported "UNICOMIDMP"."TU_REL_GROUP_RESOURCE"        67.49 KB    1533 rows
. . exported "UNICOMIDMP"."TU_REL_USER_GROUP"            57.61 KB     686 rows
. . exported "UNICOMIDMP"."TU_USERBASEINFO"              107.9 KB     565 rows
Master table "UNICOMIDMP"."SYS_EXPORT_TABLE_01" successfully loaded/unloaded
******************************************************************************
Dump file set for UNICOMIDMP.SYS_EXPORT_TABLE_01 is:
  /ora/dumpfiles/expdp_0517_ml_1234.dmp
Job "UNICOMIDMP"."SYS_EXPORT_TABLE_01" successfully completed at 15:10:43


在12c导入,加了version='11.2.0.3.0'        见下面

[oracle@localhost dpdump]$ ls -l
total 544
-rw-r----- 1 oracle oinstall    116 May 10 10:31 dp.log
-rw-r----- 1 oracle oinstall 552960 May 17 14:43 expdp_0517_ml_1234.dmp
[oracle@localhost dpdump]$ impdp un***/***** directory=DATA_PUMP_DIR dumpfile=expdp_0517_ml_1234.dmp TABLE_EXISTS_ACTION=replace version='11.2.0.3';

Import: Release 12.1.0.2.0 - Production on Tue May 17 14:49:22 2016

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

Connected to: Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
ORA-39006: internal error
ORA-39213: Metadata processing is not available

--我们看看错位描述

[oracle@localhost ~]$ oerr ora 39213
39213, 00000, "Metadata processing is not available"
// *Cause:  The Data Pump could not use the Metadata API.  Typically,
//          this is caused by the XSL stylesheets not being set up properly.
// *Action: Connect AS SYSDBA and execute dbms_metadata_util.load_stylesheets
//          to reload the stylesheets.
[oracle@localhost ~]$

--那我们就按照这个方法处理,试试

SQL> execute sys.dbms_metadata_util.load_stylesheets;

PL/SQL procedure successfully completed.

--再,试试

[oracle@localhost dpdump]$ impdp uni/**** directory=DATA_PUMP_DIR dumpfile=expdp_0517_ml_1234.dmp TABLE_EXISTS_ACTION=replace version='11.2.0.3.0';

Import: Release 12.1.0.2.0 - Production on Tue May 17 15:21:01 2016

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

Connected to: Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
Master table "UNICOMIDMP"."SYS_IMPORT_FULL_01" successfully loaded/unloaded
import done in ZHS16GBK character set and AL16UTF16 NCHAR character set
export done in ZHS16GBK character set and UTF8 NCHAR character set
WARNING: possible data loss in character set conversions
Starting "UNICOMIDMP"."SYS_IMPORT_FULL_01":  unicomidmp/******** directory=DATA_PUMP_DIR dumpfile=expdp_0517_ml_1234.dmp TABLE_EXISTS_ACTION=replace version=11.2.0.3.0 
Processing object type TABLE_EXPORT/TABLE/TABLE
Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
. . imported "UNICOMIDMP"."TU_GROUPBASEINFO"             7.210 KB       9 rows
. . imported "UNICOMIDMP"."TU_PERMISSION"                23.53 KB     465 rows
. . imported "UNICOMIDMP"."TU_REL_GROUP_RESOURCE"        67.49 KB    1533 rows
. . imported "UNICOMIDMP"."TU_REL_USER_GROUP"            57.61 KB     686 rows
. . imported "UNICOMIDMP"."TU_USERBASEINFO"              107.9 KB     565 rows
Processing object type TABLE_EXPORT/TABLE/COMMENT
Processing object type TABLE_EXPORT/TABLE/INDEX/INDEX
Processing object type TABLE_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
Processing object type TABLE_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
Processing object type TABLE_EXPORT/TABLE/CONSTRAINT/REF_CONSTRAINT
Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
Job "UNICOMIDMP"."SYS_IMPORT_FULL_01" successfully completed at Tue May 17 15:21:11 2016 elapsed 0 00:00:10

[oracle@localhost dpdump]$ 

--OK ,轻松搞定。



2016.5.17

---end  . mengl



  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值