Skip to main content

12 Things about Oracle 12c -- Part 3

DataPump: Export Views as Tables

Switching from RMAN, DataPump provides a new set of features that allow for increased abilities to export, transform and import data. To that end, Oracle Data Pump allows users to export a view as a table. 

This feature can be utilized whether data pump is accessed via command line, parameter file, or using the DBMS_DATAPUMP package. 

Command-line and parameter file options are the same (obviously). 

In the screenshot above, we are exporting two tables from a PeopleSoft database using the TABLES parameter. We are also exporting a view using the VIEWS_AS_TABLES parameter. 

When executed with these parameters, we see the following output in the log file and standard output: 
and

Along with the data, exported views also include constraints and grants. 

Invoking this feature using the DBMS_DATAPUMP package is done like so: 

DBMS_DATAPUMP.METADATA_FILTER(h1,'VIEWS_AS_TABLES','in (''PSOPRDEFN_VW'')');

Use Cases

Using Oracle Data Pump to transform data from source to target. Using this technique can improve performance of exporting data over database link as well.

Source

http://www.oracle.com/technetwork/database/enterprise-edition/oow2013-data-pump-2044029.pdf


NOTE: There is some foreshadowing in the screenshots above. Regular data pump users may know what it is already. 

Comments