Data Pump File

Source: Internet
Author: User

Expdp Introduction
EXPDP command line options
1. ATTACH
This option is used to establish an association between a customer session and an existing export role. The syntax is as follows:
ATTACH = [schema_name.] job_name
Schema_name is used to specify the scheme name, And job_name is used to specify the export job name. Note: If the ATTACH option is used, no other options can be specified in the command line except the connection string and ATTACH options. The example is as follows:
Expdp scott/tiger ATTACH = scott. export_job

2. CONTENT
This option is used to specify the content to be exported. The default value is ALL.
CONTENT = {ALL | DATA_ONLY | METADATA_ONLY}
When the CONTENT is set to ALL, only the object data is exported when the definition of the exported object and ALL its data is set to DATA_ONLY. If the value is METADATA_ONLY, only the object definition is exported.
Expdp scott/tiger DIRECTORY = dump DUMPFILE = a. dump CONTENT = METADATA_ONLY

3. DIRECTORY
Specifies the directory where the dump and log files are located
DIRECTORY = directory_object
Directory_object is used to specify the DIRECTORY object name. Note that the DIRECTORY object is an object created using the create directory statement, not an OS DIRECTORY.
Expdp scott/tiger DIRECTORY = dump DUMPFILE = a. dump

4. DUMPFILE
Specifies the name of the dump file. The default name is expdat. dmp.
DUMPFILE = [directory_object:] file_name [,…]
Directory_object is used to specify the DIRECTORY object name, And file_name is used to specify the dump file name. Note that if directory_object is not specified, the export tool automatically uses the DIRECTORY object specified by the DIRECTORY option.
Expdp scott/tiger DIRECTORY = dump1 DUMPFILE = dump2: a. dmp

5. ESTIMATE
Used to estimate the disk space occupied by the exported table. The default value is BLOCKS.
ESTIMATE = {BLOCKS | STATISTICS}
When it is set to BLOCKS, oracle estimates the space occupied by the object based on the number of data BLOCKS occupied by the target object multiplied by the data block size. When it is set to STATISTICS, it estimates the space occupied by the object based on the recent statistical value.
Expdp scott/tiger TABLES = emp ESTIMATE = statistics directory = dump DUMPFILE = a. dump

6. ESTIMATE_ONLY
Specifies whether to estimate only the disk space occupied by the Export job. The default value is N.
EXTIMATE_ONLY = {Y | N}
When it is set to Y, the export function only estimates the disk space occupied by the object, and does not execute the export job. When it is N, it not only estimates the disk space occupied by the object, the export operation is also performed.
Expdp scott/tiger ESTIMATE_ONLY = y NOLOGFILE = y

7. EXCLUDE (for details, see 2. Exclude to export the specified object of the specified type in the user)
This option is used to specify the release object type or related objects to be excluded when the operation is executed.
EXCLUDE = object_type [: name_clause] [,…]
Object_type is used to specify the object type to be excluded. name_clause is used to specify the specific object to be excluded. EXCLUDE and INCLUDE cannot be used at the same time.
Expdp scott/tiger DIRECTORY = dump DUMPFILE = a. dup EXCLUDE = VIEW

8. FILESIZE
Specifies the maximum size of the exported file. The default value is 0, indicating that the file size is unlimited)

9. FLASHBACK_SCN
Specifies the time when table data is exported for a specific SCN.
FLASHBACK_SCN = scn_value
Scn_value is used to identify the SCN value. FLASHBACK_SCN and FLASHBACK_TIME cannot be used at the same time.
Expdp scott/tiger DIRECTORY = dump DUMPFILE = a. dmp FLASHBACK_SCN = 358523

10. FLASHBACK_TIME
Export table data at a specific time point
FLASHBACK_TIME = "TO_TIMESTAMP (time_value )"
Expdp scott/tiger DIRECTORY = dump DUMPFILE = a. dmp FLASHBACK_TIME = "TO_TIMESTAMP ('25-08-2004 14:35:00 ', 'dd-MM-YYYY HH24: MI: ss ')"

11. FULL
Specify the database mode for export. The default value is N.
FULL = {Y | N}
If the value is Y, the database is exported.

12. HELP
Specifies whether to display the help information of the EXPDP command line option. The default value is N.
When set to Y, the export options help information is displayed.
Expdp help = y

13. INCLUDE (for details, see 1. Include: export specified objects of the specified type in the user)
Specifies the object type and related objects to be included during export.
INCLUDE = object_type [: name_clause] [,… ]

14. JOB_NAME
Name of the role to be exported. The default value is SYS_XXX.
JOB_NAME = jobname_string
SELECT * FROM DBA_DATAPUMP_JOBS; -- view existing jobs

15. LOGFILE
Specifies the name of the exported log file. The default name is export. log.
LOGFILE = [directory_object:] file_name
Directory_object is used to specify the DIRECTORY object name, And file_name is used to specify the exported log file name. If directory_object is not specified, the corresponding DIRECTORY option value is automatically used for export.
Expdp scott/tiger DIRECTORY = dump DUMPFILE = a. dmp logfile = a. log

16. NETWORK_LINK
Specifies the database chain name. If you want to export the remote database object to the dump file of the local routine, you must set this option.
For example, expdp gwm/gwm directory = dir_dp NETWORK_LINK = igisdb tables = p_street_area dumpfile = p_street_area.dmp logfile = p_street_area.log job_name = my_job
Igisdb is the link name between the target database and the source data,
Dir_dp is the directory on the target database
If you directly use the connection string (@ fgisdb) and expdp is a server tool, the files generated by expdp are stored on the server by default.

17. NOLOGFILE
This option is used to specify whether to generate exported log files. The default value is N.

18. PARALLEL
Number of parallel processes that execute the export operation. The default value is 1.
Note: The concurrency setting should not exceed 2 times of the number of cpus. If the number of CPUs is 2, you can set PARALLEL to 2. The speed of importing data is faster than that of PARALLEL.
For exported files, if PARALLEL is set to 2, there is only one exported file, and the export speed is not improved much. Because the exported files are all the same file, they compete for resources. Therefore, you can set two export files as follows:
Expdp gwm/gwm directory = d_test dumpfile = gwmfile1.dp, gwmfile2.dp parallel = 2

19. PARFILE
Specify the name of the exported parameter file
PARFILE = [directory_path] file_name

20. QUERY
Where condition used to filter and export data
QUERY = [schema.] [table_name:] query_clause
Schema is used to specify the solution name, table_name is used to specify the table name, And query_clause is used to specify the condition restriction clause. The QUERY option cannot be used with CONNECT = METADATA_ONLY, EXTIMATE_ONLY, TRANSPORT_TABLESPACES and other options at the same time.
Expdp scott/tiger directory = dump dumpfile = a. dmp Tables = emp query = 'where deptno = 20'

21. SCHEMAS
This scheme is used to specify the execution scheme mode for export. The default is the current user scheme.

22. STATUS
Specifies the detailed status of the exported process. The default value is 0.

23. TABLES
Export in specified table mode
TABLES = [schema_name.] table_name [: partition_name] [,…]
Schema_name is used to specify the solution name, table_name is used to specify the name of the exported table, and partition_name is used to specify the name of the partition to be exported.

24. TABLESPACES
Table space list to export

25. TRANSPORT_FULL_CHECK
This option is used to check the association between the removed tablespace and the unmoved tablespace. The default value is N.
When it is set to Y, the export function checks the complete association of the space directly. If only one tablespace in the tablespace or its index is moved, an error message is displayed. when it is set to N, the export function only checks single-ended dependencies. If the index's tablespace is moved but the table's tablespace is not moved, the error message is displayed. If the table's tablespace is moved, if the tablespace where the index is not moved, no error message is displayed.

26. TRANSPORT_TABLESPACES
Specify the execution tablespace mode for export

27. VERSION
Specifies the database version of the exported object. The default value is COMPATIBLE.
VERSION = {COMPATIBLE | LATEST | version_string}
When the value is COMPATIBLE, object metadata is generated based on the initialization parameter COMPATIBLE. When the value is LATEST, object metadata is generated based on the actual database version. version_string is used to specify the database version string. EXPDP is called.

Steps for Data Pump tool export:
1. create DIRECTORY
Create directory dir_dp as D: oracledir_dp;
2. Authorization
Grant read, write on directory dir_dp to ENTUC;
-- View directories and permissions
SELECT privilege, directory_name, DIRECTORY_PATH FROM user_tab_privs t, all_directories d
WHERE t. table_name (+) = d. directory_name order by 2, 1;
3. Execute Export
Expdp userid = ENTUC/entuc as sysdba schemas = entuc directory = dir_dp dumpfile = entuc. dmp logfile = entuc. log version = 10.2.0.2.0

Connect to: Oracle Database 10g Enterprise Edition Release 10.2.0.1
With the Partitioning, OLAP and Data Mining options
Note:
1. directory = dir_dp must be placed before, if placed last, will prompt ORA-39002: The operation is not valid
ORA-39070: Unable to open the log file.
ORA-39087: Invalid directory name DATA_PUMP_DIR;

2. During the export process, data dump creates and uses an object named SYS_EXPORT_SCHEMA_01, which is the JOB name used in the data dump export process, if you do not specify the name of the exported JOB when executing this command, a default JOB name is generated. If you specify the JOB name during the export process
Change it:
Expdp

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.