How Does Data Pump Move Data ?
Using Data File Copying to Move Data :
The fastest method of moving data is to copy the database data files to the target database without interpreting or altering the data. With this method, Data Pump Export is used to unload only structural information (metadata) into the dump file. This method is used in the following situations:
>> The TRANSPORT_TABLESPACES parameter is used to specify a transportable tablespace export. Only metadata for the specified tablespaces is exported.
>> The TRANSPORTABLE=ALWAYS parameter is supplied on a table mode export (specified with the TABLES parameter) or a full mode export (specified with the FULL parameter) or a full mode network import (specified with the FULL and NETWORK_LINK parameters).
When an export operation uses data file copying, the corresponding import job always also uses data file copying. During the ensuing import operation, both the data files and the export dump file must be loaded.
Using Direct Path to Move Data :
In this method, the SQL layer of the database is bypassed and rows are moved to and from the dump file with only minimal interpretation. Data Pump automatically uses the direct path method for loading and unloading data unless the structure of a table does not allow it. For example, if a table contains a column of type BFILE, then direct path cannot be used to load that table and external tables is used instead.
Using External Tables to Move Data :
When data file copying is not selected and the data cannot be moved using direct path, the external tables mechanism is used. The external tables mechanism creates an external table that maps to the dump file data for the database table. The SQL engine is then used to move the data. Data Pump might use external tables for the export, but use direct path for the import.
In particular, Data Pump uses external tables in the following situations:
>> Loading and unloading very large tables and partitions in situations where it is advantageous to use parallel SQL capabilities
>> Loading tables with global or domain indexes defined on them, including partitioned object tables
>> Loading tables with active triggers or clustered tables
>> Loading and unloading tables with encrypted columns
>> Loading tables with fine-grained access control enabled for inserts
>> Loading tables that are partitioned differently at load time and unload time
>> Loading a table not created by the import operation (the table exists before the import starts)
Using Conventional Path to Move Data :
In situations where there are conflicting table attributes, Data Pump is not able to load data into a table using either direct path or external tables. In such cases, conventional path is used, which can affect performance.
Using Network Link Import to Move Data :
When the Import NETWORK_LINK parameter is used to specify a network link for an import operation, SQL is used to move the data using an INSERT SELECT statement. The SELECT clause retrieves the data from the remote database over the network link. The INSERT clause uses SQL to insert the data into the target database. There are no dump files involved.
When the Export NETWORK_LINK parameter is used to specify a network link for an export operation, the data from the remote database is written to dump files on the target database. (Note that to export from a read-only database, the NETWORK_LINK parameter is required.)
Because the link can identify a remotely networked database, the terms database link and network link are used interchangeably.
Note :
Data Pump does not load tables with disabled unique indexes. To load data into the table, the indexes must be either dropped or reenabled.
No comments:
Post a Comment