Oracle Data Pump. Using Parameter File (parfile)

Hello everyone, in this new entry we bring you news about the functionality of the parfile. The parfile is a parameter file used when we want to export/import necessary information with Oracle Data Pump. Oracle Data Pump is an Oracle tool. It is available from version 11g onwards to quickly migrate data. This is the new version of the old conventional export of previous versions.

The parfile can be called on a command line, so it can be very useful if the same combination of parameters is used many times. Using parameter files is also highly recommended if using parameters whose values require the use of quotes such as exclude tables.

Oracle Data Pump Example

On this occasion, our client needs to migrate the information from two schemas of its main database. But you need to exclude several tables that you will not use in the migrated development environment. In the conventional way it would be very complex and extensive. It would be necessary to write the command line with all the parameters that we can see in the image, surely causing errors in its execution. To do this, we create a single parfile file where we place everything necessary for it to be called quickly and easily.

Here we can see all the common and not so common parameters such as exclude=table:”IN(‘X tables’)” or dumpfile=export_%U.DMP (parallelism). These parameters can be included in the parfile file without having to write them on a long command line on the server:

expdb system/********@TNSNAME parfile=parametros.par

After running this command, the export datapump starts without any problems. As we see in the following screenshot, it begins to read the data from the parfile file that we have included.

Oracle Data Pump

Once this is executed, all that remains is to wait for the export process to finish. We will carry out the following steps for the import, but we will see this in future posts.

We hope that, after this article, you will be able to carry out this kind of datapump export without problems, but if you prefer that we try it, contact us.

Scroll to Top