Oracle数据泵的兼容性 Export/Import DataPump Parameter VERSION - Compatibility of Data Pump Between Different Oracle Versions (Doc ID 553337.1)

0    739    1

Tags:

👉 本文共约24774个字,系统预计阅读时间或需94分钟。

In this Document

APPLIES TO:

Enterprise Manager for Oracle Database - Version 10.1.0.2 and later
Oracle Database Backup Service - Version N/A and later
Oracle Database Cloud Service - Version N/A and later
Oracle Database - Standard Edition - Version 10.1.0.2 and later
Gen 1 Exadata Cloud at Customer (Oracle Exadata Database Cloud Machine) - Version N/A and later
Information in this document applies to any platform.

PURPOSE

This article describes issues related to the compatibility of the different versions of the Oracle Export Data Pump and Import Data Pump utilities.

SCOPE

The article is intended for users of the Oracle10g and Oracle11g databases who wish to use Export Data Pump (expdp) and Import Data Pump (impdp) to export data from an Oracle database release x and import this data into an Oracle database release y. The article gives information how to create an Export Data Pump dumpfile that can be imported into a higher or lower release database, and how the compatibility applies when Data Pump is used over a database link.
For the compatibility of the original export and import clients (exp resp. imp), see:
Note:132904.1 "Compatibility Matrix for Export & Import Between Different Oracle Versions"
For the transportable tablespaces export/import, see:
Note:291024.1 "Compatibility and New Features when Transporting Tablespaces with Export and Import"
In the text below, the following terminology is used:

  • Source database = the database where the data is exported from.
  • Target database = the database where the data is imported into.
  • Database compatibility level = the value of init.ora/spfile parameter COMPATIBLE.
  • Data Pump client version = the release version of the Data Pump client (software version).
  • Database version = the release version (the first four digits) of the ORACLE_HOME (= version of database dictionary).

DETAILS

1. Summary

The following are the most important guidelines regarding Data Pump compatibility:

  1. The compatibility level of the Data Pump dumpfile set is determined by the compatibility level of the source database.

  2. Use the Export Data Pump client (expdp) that matches the version of the source database (up to one major version lower expdp client can be used, but this is not recommended).

  3. Use the Import Data Pump client (impdp) that matches the version of the target database (up to one major version lower impdp client can be used, but this is not recommended).

  4. Use the Export Data Pump parameter VERSION in case the target database has a lower compatibility level than the source database.

  5. Transferring data over a database link is supported even if the compatibility level of the (remote) source database differs from the (local) connected database (up to one major version difference is supported).

  6. Import Data Pump can always read Export Data Pump dumpfile sets created by older versions of the database.

  7. Export dumpfiles created with the Export Data Pump client (expdp) cannot be read by the original Import client (imp).

  8. Export dumpfiles created with the original Export client (exp) cannot be read by the Import Data Pump client (impdp).

Overview of Data Pump dumpfile compatibility.

Export Use Export Data Pump parameter VERSION=...
From if dumpfile needs to be imported into a
Source Target Database with compatibility level
Database (value of init.ora/spfile parameter COMPATIBLE):
With

Overview of Data Pump client/server compatibility.

For details about generic interoperability between Oracle client and server versions, see also:
Note:207303.1 "Client / Server / Interoperability Support Between Different Oracle Versions"

Overview of Data Pump dumpfile set file versions.

Overview of Data Pump client/feature compatibility.

2. Introduction

2.1. Data Pump.
With Oracle10g Release 1 (10.1.0.x) we have introduced the new Export DataPump (expdp) and Import DataPump (impdp) utilities. These utilities have a better performance and increased flexibility when compared to the original export (exp) and import (imp) clients. All Data Pump Export and Import processing, including the reading and writing of dump files, is done on the system (server) selected by the specified database connect string.
With the Oracle Export Data Pump and Import Data Pump utilities you can transfer data objects between Oracle databases, even if they reside on platforms with different hardware and software configurations. With Export Data Pump the object definitions and table data can be extracted from an Oracle database and stored in an Oracle binary-format export Data Pump dumpfile located on the server.
The dumpfile set can then be transferred using FTP in binary mode or physically transported to a different site. With the Import Data Pump client the object definitions and table data can be read from the dumpfile set and then inserted into the Oracle database.


2.2. How to determine the database compatibility level ?
To determine the compatibility level of the database, run the following in SQL*Plus:

When checking for compatibility, Data Pump examins the major database release number and the database maintenance release number (i.e.: 11.1 in the example output above).
For details about version numbers, see also:
Note:39691.1 "VERSION NUMBER - Oracle version numbers explained"


2.3. How to determine the software version of the database and the Data Pump client ?
The software version of the Export Data Pump and Import Data Pump clients can be obtained by invoking the utilities with the parameter HELP=Y. The banner of the help page shows the version of the utility:

For details, see also:
Note:175627.1 "Export-Import iSR - How to Find the Database and Export/Import Version"


2.4. How to obtain the version of an export Data Pump dumpfile ?
Every export dumpfile starts with a header (usually 4 kb in size) which contains details about the dumpfile. Starting with Oracle10g Release 2 (10.2.0.1.0), this header information can be extracted from the dumpfile by calling the procedure DBMS_DATAPUMP.GET_DUMPFILE_INFO.
Possible output based on an example procedure SHOW_DUMPFILE_INFO:

In the example above, the dumpfile set has the compatibility level 12.2 (12.02.00.00.00) and is using a file version format 5.1. This dumpfile set can only be imported into a database with the same or a higher compatibility level.
For details, and the example procedure SHOW_DUMPFILE_INFO which can be called to obtain the export dumpfile header details, see:
Note:462488.1 "How to Gather the Header Information and the Content of an Export Dumpfile ?"

3. Basic Data Pump Compatibility

3.1. Data Pump dumpfile file version versus Data Pump job version.
When an Export Data Pump dumpfile set is created, we store information in the header block of each dumpfile. Besides the version of the Data Pump job, we also store the version of the dumpfile. The version of the dumpfile determines the internal structure of the dumpfile:

  • In Oracle10g Release 1 we create an Export Data Pump dumpfile with version 0.1.
  • In Oracle10g Release 2 we create an Export Data Pump dumpfile with version 1.1.
  • In Oracle11g Release 1 we create an Export Data Pump dumpfile with version 2.1.
  • In Oracle11g Release 2 we create an Export Data Pump dumpfile with version 3.1.
  • In Oracle12c Release 1 we create an Export Data Pump dumpfile with version 4.1.
  • In Oracle12c Release 2 we create an Export Data Pump dumpfile with version 5.1.
  • In Oracle18c we create an Export Data Pump dumpfile with version 5.1.
  • In Oracle19c we create an Export Data Pump dumpfile with version 5.1.

Note that the version of Data Pump dumpfile set is used internally to keep track of Data Pump specific features that result in a change of the internal structure of the dumpfile.
It is not possible to create a dumpfile with a higher version, e.g.: a 11.2.0.4.0 source database cannot create a version 4.1 dumpfile because that dumpfile version has a structure that was introduced in Oracle12c. It is possible though to create a dumpfile with a lower version, e.g.: a 11.2.0.4.0 source database can also create a version 1.1 dumpfile by specifying the Export Data Pump parameter VERSION (see section 4.2. "Export Data Pump parameter: VERSION" below). The reason why you would do this is to make the dumpfile set compatible with the lower release target database so it can be imported.

With the VERSION parameter you can specify the Data Pump job version and indirectly control the version of the dumpfile set. E.g.: if you specify VERSION=11.2 then Data Pump will create a dumpfile set that can be imported into an Oracle11g Release 2 database (dumpfile version: 3.1). When specified, you also determine which version of the objects will be exported. Database objects or attributes that are incompatible with the specified version will not be exported.

本人提供Oracle(OCP、OCM)、MySQL(OCP)、PostgreSQL(PGCA、PGCE、PGCM)等数据库的培训和考证业务,私聊QQ646634621或微信db_bao,谢谢!
Oracle数据泵的兼容性	Export/Import DataPump Parameter VERSION - Compatibility of Data Pump Between Different Oracle Versions (Doc ID 553337.1)后续精彩内容已被小麦苗无情隐藏,请输入验证码解锁本站所有文章!
验证码:
请先关注本站微信公众号,然后回复“验证码”,获取验证码。在微信里搜索“DB宝”或者“www_xmmup_com”或者微信扫描右侧二维码都可以关注本站微信公众号。

标签:

Avatar photo

小麦苗

学习或考证,均可联系麦老师,请加微信db_bao或QQ646634621

您可能还喜欢...

发表回复

嘿,我是小麦,需要帮助随时找我哦。
  • 18509239930
  • 个人微信

  • DB宝
  • 个人邮箱
  • 点击加入QQ群
  • 个人微店

  • 回到顶部