Data Pump is a new function launched by Oracle 10g. The difference between expdp/impdp AND exp/imp is that exp/imp is a client tool and can be used either on the client or on the server. Expdp/impdp is a server tool and can only be used on the server.
Expdp parameter description
- [Oracle @ linux exp] $ expdp help = y
- Export: Release 10.2.0.4.0-ProductionOnWednesday, October, 2011 17:30:17
- Copyright (c) 2003,200 7, Oracle.AllRights reserved.
- The data pump export utility provides a method for transferring data between Oracle databases.
- Data Object mechanism. The utility can be called using the following command:
- Example: expdp scott/tiger DIRECTORY = dmpdir DUMPFILE = scott. dmp
- You can control the export running mode. The specific method is as follows:'Expdp'Enter
- Parameters. To specify parameters, use the Keyword:
- Format: expdp KEYWORD = value or KEYWORD = (value1, value2,..., valueN)
- Example: expdp scott/tiger DUMPFILE = scott. dmp DIRECTORY = dmpdir SCHEMAS = scott
- Or TABLES = (T1: P1, T1: P2). If T1 is a partitioned table
- USERID must be the first parameter in the command line.
- Keyword description (default)
- ------------------------------------------------------------------------------
- ATTACH connects to an existing job, for example, ATTACH [= job name].
- COMPRESSION reduces the size of valid dump files
- Keyword values: (METADATA_ONLY) and NONE.
- CONTENT specifies the data to be detached. The valid keyword is:
- (ALL), DATA_ONLY and METADATA_ONLY.
- DIRECTORY is the DIRECTORY object used by dump files and log files.
- The list of DUMPFILE target dump files (expdat. dmp,
- For example, DUMPFILE = scott1.dmp, scott2.dmp, dmpdir: scott3.dmp.
- ENCRYPTION_PASSWORD is the key word used to create an encryption column.
- ESTIMATE calculates the estimated job value. The valid keyword is:
- (BLOCKS) andSTATISTICS.
- ESTIMATE_ONLY calculates the estimated job value without executing the export operation.
- EXCLUDE to EXCLUDE specific object types, such as EXCLUDE =TABLE: EMP.
- FILESIZE specifies the size of each dump in bytes.
- FLASHBACK_SCN is used to set the session snapshot back to the SCN in the previous state.
- FLASHBACK_TIME is used to obtain the SCN time closest to the specified time.
- FULLExport the entire database (N ).
- HELP displays the HELP message (N ).
- INCLUDE includes specific object types, such as INCLUDE = TABLE_DATA.
- The name of the export job to be created in JOB_NAME.
- LOGFILE log File Name (export. log ).
- The name of the remote database to which NETWORK_LINK is linked.
- NOLOGFILE does not write log files (N ).
- PARALLEL changes the number of active workers of the current job.
- PARFILE specifies the parameter file.
- QUERY is the predicate clause used to export a subset of a table.
- The percentage of data to be exported in SAMPLE;
- List of schemes to be exported by SCHEMAS (logon scheme ).
- When the default value (0) shows the new STATUS when available,
- The frequency (in seconds) job status to be monitored.
- TABLES identifies the list of TABLES to be exported-There is only one solution.
- TABLESPACES identifies the list of TABLESPACES to be exported.
- TRANSPORT_FULL_CHECK verifies the storage segments of all tables (N ).
- TRANSPORT_TABLESPACES: List of tablespaces from which metadata is to be detached.
- The VERSION of the object to be exported. The valid keyword is:
- (COMPATIBLE), LATEST or any valid database version.
- The following commands are valid in interactive mode.
- Note: abbreviations are allowed.
- Command description
- ------------------------------------------------------------------------------
- ADD_FILE adds a dump file to the dump set.
- CONTINUE_CLIENT returns to record mode. If the job is idle, the job is restarted.
- EXIT_CLIENT exits the Client Session and keeps the job running.
- The default file size (in bytes) of the subsequent ADD_FILE command ).
- HELP summarizes interactive commands.
- KILL_JOB separates and deletes jobs.
- PARALLEL changes the number of active workers of the current job.
- PARALLEL = <number of workers>.
- START_JOB start/restore the current job.
- When the default value (0) shows the new STATUS when available,
- The frequency (in seconds) job status to be monitored.
- STATUS [= interval]
- STOP_JOB closes the executed job in sequence and exits the client.
- STOP_JOB = IMMEDIATE will be closed immediately
- Data pump operation.
The Data Pump must depend on the directory.
- SQL> showUser
- USERIs"SYS"
- SQL>CreateDirectory expAs '/U01/exp';
- The directory has been created.
Full mode Export
- Expdp system/oracle @ orcl directory = expFull= Y
User Mode Export
- Expdp system/oracle @ orcl directory = exp schemas = ing dumpfile = demo1.dmp logfile = demp1.log
Tablespace mode Export
- Expdp system/oracle @ orcl directory = exp tablespaces = test01
Table mode Export
- Expdp system/oracle @ orcl directory = exp tables = ing. dept
- [Oracle @ linux exp] $ ll
- Total 100
- -Rw-r----- 1 oracle oinstall 94208 10-05 expdat. dmp
- -Rw-r-- R -- 1 oracle oinstall 1090 10-05 export. log
Estimate the export time instead of actual export
- Expdp system/oracle @ orcl directory = expFull= Y estimate = blocks estimate_only = y
- Expdp system/oracle @ orcl directory = expFull= Y estimate =StatisticsEstimate_only = y
Export only data rows
- Expdp system/oracle @ orcl directory = exp schemas = ing content = data_only
Export object definitions only
- Expdp system/oracle @ orcl directory = exp schemas = ing content = metadata_only
Exclude specific object Export
- Expdp system/oracle @ orcl directory = exp schemas = ing exclude =Table:\"= \ 'Test \'\"
Contains specific objects for export
- Expdp system/oracle @ orcl directory = exp schemas = ing include =Table:\"Like \ 'de % \'\"
Export with where
- Expdp system/oracle @ orcl directory = exp schemas = ing query = ing. test :\"Where rownum \ <3 \"