Oracle's EXPDP and IMPDP commands use detailed

Source: Internet
Author: User

Data pump includes export table, export scheme, export table space, export database 4 ways.

1, EXPDP command parameters and instructions

(1) ATTACH

This option is used to establish an association between a client session and an existing export action. The syntax is as follows

Attach=[schema_name.] Job_name

Schema_name is used to specify the scheme name, job_name to specify the export job name. Note that if you use the Attach option, you cannot specify any other options except for the connection string and the Attach option on the command line, as shown in the following example:

EXPDP Scott/tiger Attach=scott.export_job

(2) CONTENT

This option is used to specify what to export. The default value is all

Content={all | data_only | Metadata_only}

When the content is set to all, the object definition and all its data are exported. When data_only, only object data is exported, and only object definitions are exported when metadata_only.

EXPDP Scott/tiger directory=dump dumpfile=a.dump content=metadata_only

(3) DIRECTORY

Specifies the directory where the dump files and log files are located, Directory=directory_object

Directory_object is used to specify the directory object name. Note that directory objects are objects created using the Create DIRECTORY statement, not the OS directory.

EXPDP Scott/tiger Directory=dump Dumpfile=a.dump

First create a physical folder in the corresponding location, such as D:/backup

Create a directory:

Create or replace directory backup as '/opt/oracle/utl_file '

Sql>create DIRECTORY backup as ' d:/backup ';

Sql>grant read,write on directory backup to SYSTEM;

The query created those subdirectories:

SELECT * from Dba_directories;

(4) DumpFile

Use to specify 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, file_name to specify the dump file name. Note that if you do not specify Directory_object, the export tool automatically uses directory objects specified by the directory option: EXPDP scott/tiger directory=dump1 dumpfile=dump2:a.dmp

(5) Estimate

Specifies the disk space partition method used to estimate which table is being exported. The default value is blocks.

Extimate={blocks | STATISTICS}

When set to blocks, Oracle calculates the space occupied by the target object by multiplying the number of blocks of data used by the data block size, and when set to statistics, estimates the object footprint based on recent statistics: EXPDP Scott/tiger tables=emp Estimate=statistics Directory=dump Dumpfile=a.dump

(6) Extimate_only

Specifies whether to estimate only the disk space occupied by the export job, the default value is Nextimate_only={y | N

When set to Y, the export effect estimates only the disk space occupied by the object, but does not perform an export job, when n, not only estimating the disk space occupied by the object, but also performing an export operation.

EXPDP Scott/tiger estimate_only=y Nologfile=y

(7) EXCLUDE

This option specifies the release of the object type or related object to exclude when performing an action

Exclude=object_type[:name_clause] [,...]

Object_type is used to specify the type of object to exclude, name_clause to specify the specific object to exclude. 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, which defaults to 0 (indicates file size is not limited)

(9) FLASHBACK_SCN

Specifies that table data is exported for a specific SCN time. 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

(a) Flashback_time

Specify the export of table data for a specific point in time

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 ') "

(one) full

Specifies the database schema export, which defaults to N. Full={y | N}. When Y, the identity performs the database export.

(a) Help

Specifies whether to display help information for the EXPDP command-line option, which defaults to N. When set to Y, help information for the export option is displayed. EXPDP help=y

(a) INCLUDE

Specifies the type of object to include when exporting and related objects. INCLUDE = Object_type[:name_clause] [,...]

(job_name)

Specifies the name of the function to export, which defaults to sys_xxx. Job_name=jobname_string

(LOGFILE)

Specifies the name of the export log file file, with the default name Export.log

Logfile=[directory_object:]file_name

Directory_object is used to specify the directory object name, file_name to specify the export log filename. If you do not specify Directory_object. The export action automatically uses the appropriate option values for your directory.

EXPDP Scott/tiger directory=dump dumpfile=a.dmp logfile=a.log

(Network_link)

Specifies the database link name, and you must set this option if you want to export the remote database object to a dump file in your local routine.

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.