How to Gather the Header Information and the Content of an Export Dumpfile?

I’ve found a great document at My Oracle Support (Metalink): How to Gather the Header Information and the Content of an Export Dumpfile? [ID 462488.1]. The document explains how to extract DDL statements from dumpfiles and how to use GET_DUMPFILE_INFO procedure (of DBMS_DATAPUMP package) to gather header information for both original and datapump exports.

In summary,

The Data Definition Language (DDL) statements in a DataPump dumpfile can be extracted with the parameter SQLFILE:

Note: This command will not import the data, but it still needs a valid database connection.

The Data Definition Language (DDL) statements in a original export file can be extracted with the parameter SHOW:

Sample PL/SQL code which uses DBMS_DATAPUMP.GET_DUMPFILE_INFO can be found at MOS [ID 462488.1]. Unfortunately this procedure can only be used in an Oracle10g Release 2 or any higher release database.

After I’ve made some tests with PL/SQL code, I decided to examine Oracle export files and write my own utility to read the header information.

Oracle DataPump “INCLUDE” parameter and limit of 4000 chars

I’ve seen a question about the INCLUDE parameter of DataPump at OTN Forums. The user needed to enter 900+ tables into include parameter but she got “UDE-00014: invalid value for parameter, ‘include'”:

Although there’s no limit on the number of objects you enter, “include” parameter accepts only 4000 characters. A simple workaround is to use a table to hold the names of the tables/objects and use this table with include parameter: