本文主要是介绍从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 2016Copyright (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 2016Copyright (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 2016Copyright (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
这篇关于从oracle 11g导出-12c 导入 ,遇到ORA-39213: Metadata processing is not available的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!