With the data pump, you can use the query parameter to export only the records that are returned from the query in a table. I wanted to share this parameter because it was very useful.
In this way, we can export only a required part of a large table and import it with this data.
Example use is as follows:
In the example, the records of the “dept_id” value in the emp table greater than 10 and the “sal” value greater than 10000 will be exported. Other records will not be included in export.
1 |
$ expdp hr/hr QUERY=emp:'"WHERE dept_id > 10 AND sal > 10000"' NOLOGFILE=y DIRECTORY=data_pump_dir DUMPFILE=exp1.dmp |