从 11g 数据库导出时出现 Oracle 12c 数据泵错误
Oracle 12c datapump error when exporting from 11g database
我在 cmd 中使用以下命令。
expdp system/*****@11.11.1.11:1521/orcl schemas=HR directory=DATADIR
dumpfile=HR_20150625.dmp logfile=HR_20150625.log version=11.2
- 要从中导出模式的数据库是 11g (11.2.0.1.0)
- 数据泵实用程序是 12c (12.1.0.1.0)
我收到以下错误
UDE-00018: Data Pump client is incompatible with database version 11.2.0.1.0
我该如何解决这个问题?
如果我理解正确的话,您是从 Oracle 12c 导出并导入到 Oracle 11g。为此,您需要 VERSION
参数 (Source):
在您的 12c 实例上(忽略 11g 引用):
C:\Users\Steve>expdp hr/hr TABLES=hr.employees2 VERSION=10.2 DIRECTORY=data_pump_dir DUMPFILE=emp2.dmp LOGFILE=emp2.log
Export: Release 11.2.0.1.0 - Production on Tue Sep 7 09:10:51 2010
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Starting "HR"."SYS_EXPORT_TABLE_01": hr/******** TABLES=hr.employees2 VERSION=10.2 DIRECTORY=data_pump_dir DUMPFILE=emp2.dmp LOGFILE=emp2.log
Estimate in progress using BLOCKS method...
Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
Total estimation using BLOCKS method: 64 KB
Processing object type TABLE_EXPORT/TABLE/TABLE
. . exported "HR"."EMPLOYEES2" 16.12 KB 107 rows
Master table "HR"."SYS_EXPORT_TABLE_01" successfully loaded/unloaded
******************************************************************************
Dump file set for HR.SYS_EXPORT_TABLE_01 is:
C:\APP\ORACLE\ADMIN\ORCL\DPDUMP\EMP2.DMP
Job "HR"."SYS_EXPORT_TABLE_01" successfully completed at 09:11:01
然后在您的 11g 实例上(再次忽略 10g 引用):
C:\Users\Steve>impdp hr/hr TABLES=hr.employees2 DIRECTORY=data_pump_dir DUMPFILE=emp2.dmp LOGFILE=emp2_imp.log
Import: Release 10.2.0.1.0 - Production on Tuesday, 07 September, 2010 9:25:53
Copyright (c) 2003, 2005, Oracle. All rights reserved.
Connected to: Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
Master table "HR"."SYS_IMPORT_TABLE_01" successfully loaded/unloaded
Starting "HR"."SYS_IMPORT_TABLE_01": hr/******** TABLES=hr.employees2 DIRECTORY=data_pump_dir DUMPFILE=emp2.dmp LOGFILE=emp2_imp.log
Processing object type TABLE_EXPORT/TABLE/TABLE
Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
. . imported "HR"."EMPLOYEES2" 16.12 KB 107 rows
Job "HR"."SYS_IMPORT_TABLE_01" successfully completed at 09:26:05
根据 My Oracle Support 说明 553337.1,您需要 11.2 expdp 客户端才能从 11.2 源数据库进行导出。比照。这个矩阵:
Export Data Connecting to Source Database:
Pump client 10gR1 10gR2 11gR1 11gR2 12cR1
version 10.1.0.x 10.2.0.x 11.1.0.x 11.2.0.x 12.1.0.x
----------- ---------- ---------- ---------- ---------- ----------
10.1.0.x supported supported supported supported supported
10.2.0.x no supported supported supported supported
11.1.0.x no no supported supported supported
11.2.0.x no no no supported supported
12.1.0.x no no no no supported
12c impdp 可以处理所有转储文件版本:
"Import Data Pump can always read Export Data Pump dumpfile sets created by older versions of the database."
如果您的数据库 link 介于 12c 和 11g 数据库之间(在这种情况下,您连接到 12c 数据库),则可以使用 12c expdp 实用程序轻松地从 11g 导出数据。
这是一个简单的例子:
expdp user/password@host/service schemas=sample_schema network_link=link_to_11g directory=tmp dumpfile=sample_schema.dmp logfile=blabla.log
从 11g 导入到 12c。如上所述,只要两个用户都有导出权限,network_link 选项也可以使用。如果它们不可用,我会使用在 12c 中创建的 dblink 来执行 insert-select,然后使用 12c expdp。不过最好有11g的客户端。
Network_link 用法示例
expdp usr12c/pwdusr12c@12c directory = dpump_dir1
network_link=dblinkname DUMPFILE = usr11g_table_name.dmp TABLES =
table_name
我在 cmd 中使用以下命令。
expdp system/*****@11.11.1.11:1521/orcl schemas=HR directory=DATADIR
dumpfile=HR_20150625.dmp logfile=HR_20150625.log version=11.2
- 要从中导出模式的数据库是 11g (11.2.0.1.0)
- 数据泵实用程序是 12c (12.1.0.1.0)
我收到以下错误
UDE-00018: Data Pump client is incompatible with database version 11.2.0.1.0
我该如何解决这个问题?
如果我理解正确的话,您是从 Oracle 12c 导出并导入到 Oracle 11g。为此,您需要 VERSION
参数 (Source):
在您的 12c 实例上(忽略 11g 引用):
C:\Users\Steve>expdp hr/hr TABLES=hr.employees2 VERSION=10.2 DIRECTORY=data_pump_dir DUMPFILE=emp2.dmp LOGFILE=emp2.log
Export: Release 11.2.0.1.0 - Production on Tue Sep 7 09:10:51 2010
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Starting "HR"."SYS_EXPORT_TABLE_01": hr/******** TABLES=hr.employees2 VERSION=10.2 DIRECTORY=data_pump_dir DUMPFILE=emp2.dmp LOGFILE=emp2.log
Estimate in progress using BLOCKS method...
Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
Total estimation using BLOCKS method: 64 KB
Processing object type TABLE_EXPORT/TABLE/TABLE
. . exported "HR"."EMPLOYEES2" 16.12 KB 107 rows
Master table "HR"."SYS_EXPORT_TABLE_01" successfully loaded/unloaded
******************************************************************************
Dump file set for HR.SYS_EXPORT_TABLE_01 is:
C:\APP\ORACLE\ADMIN\ORCL\DPDUMP\EMP2.DMP
Job "HR"."SYS_EXPORT_TABLE_01" successfully completed at 09:11:01
然后在您的 11g 实例上(再次忽略 10g 引用):
C:\Users\Steve>impdp hr/hr TABLES=hr.employees2 DIRECTORY=data_pump_dir DUMPFILE=emp2.dmp LOGFILE=emp2_imp.log
Import: Release 10.2.0.1.0 - Production on Tuesday, 07 September, 2010 9:25:53
Copyright (c) 2003, 2005, Oracle. All rights reserved.
Connected to: Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
Master table "HR"."SYS_IMPORT_TABLE_01" successfully loaded/unloaded
Starting "HR"."SYS_IMPORT_TABLE_01": hr/******** TABLES=hr.employees2 DIRECTORY=data_pump_dir DUMPFILE=emp2.dmp LOGFILE=emp2_imp.log
Processing object type TABLE_EXPORT/TABLE/TABLE
Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
. . imported "HR"."EMPLOYEES2" 16.12 KB 107 rows
Job "HR"."SYS_IMPORT_TABLE_01" successfully completed at 09:26:05
根据 My Oracle Support 说明 553337.1,您需要 11.2 expdp 客户端才能从 11.2 源数据库进行导出。比照。这个矩阵:
Export Data Connecting to Source Database:
Pump client 10gR1 10gR2 11gR1 11gR2 12cR1
version 10.1.0.x 10.2.0.x 11.1.0.x 11.2.0.x 12.1.0.x
----------- ---------- ---------- ---------- ---------- ----------
10.1.0.x supported supported supported supported supported
10.2.0.x no supported supported supported supported
11.1.0.x no no supported supported supported
11.2.0.x no no no supported supported
12.1.0.x no no no no supported
12c impdp 可以处理所有转储文件版本:
"Import Data Pump can always read Export Data Pump dumpfile sets created by older versions of the database."
如果您的数据库 link 介于 12c 和 11g 数据库之间(在这种情况下,您连接到 12c 数据库),则可以使用 12c expdp 实用程序轻松地从 11g 导出数据。 这是一个简单的例子:
expdp user/password@host/service schemas=sample_schema network_link=link_to_11g directory=tmp dumpfile=sample_schema.dmp logfile=blabla.log
从 11g 导入到 12c。如上所述,只要两个用户都有导出权限,network_link 选项也可以使用。如果它们不可用,我会使用在 12c 中创建的 dblink 来执行 insert-select,然后使用 12c expdp。不过最好有11g的客户端。
Network_link 用法示例
expdp usr12c/pwdusr12c@12c directory = dpump_dir1 network_link=dblinkname DUMPFILE = usr11g_table_name.dmp TABLES = table_name