Chinaunix首页 | 论坛 | 博客
  • 博客访问: 184303
  • 博文数量: 46
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 490
  • 用 户 组: 普通用户
  • 注册时间: 2017-03-26 14:22
个人简介

做最Low逼的DBA

文章分类

全部博文(46)

文章存档

2017年(46)

我的朋友

分类: Oracle

2017-05-06 17:42:57

Oracle Data Pump (expdp and impdp) in Oracle Database 10g

引用

  Oracle数据库导入导出工具,可以使用exp/imp,但这是比较早期的工具

  Oracle数据泵是一个更新、更快和更灵活的选择

  除了基本的导入和导出功能之外,数据泵还提供了pl/sql API和对外部表的支持

 

   1.开始

   2.表的导出/导入

   3.对象导出/导入

   4.数据库导出/导入

   5.INCLUDE and EXCLUDE

   6.CONTENT and QUERY

   7.网络导出/导入(NETWORK_LINK

   8.闪回导出

   9.杂项信息

   10.数据泵API

   11.外部表(使用外部表卸载/加载数据)

   12.安全外部密码存储

   13.帮助

     13.1 EXPDP

     13.2 IMPDP

 

1.开始

  为了让示例工作,我们首先打开SCOTT帐户,并创建一个可以访问的目录对象

目录对象只是一个指向物理目录的指针,实际上创建后并没有在数据库服务器的文件系统上创建物理目录

已存在的DIRECTORY目录可以查询使用ALL_DIRECTORIES视图

CONN / AS SYSDBA

ALTER USER scott IDENTIFIED BY tiger ACCOUNT UNLOCK;

 

CREATE OR REPLACE DIRECTORY test_dir AS '/u01/app/oracle/oradata/';

GRANT READ, WRITE ON DIRECTORY test_dir TO scott;

 

2.表的导出/导入

  表的参数用于指定要导出的表

?  下面是表导出和导入语法的示例

expdp scott/tiger@db10g tables=EMP,DEPT directory=TEST_DIR dumpfile=EMP_DEPT.dmp logfile=expdpEMP_DEPT.log

 

impdp scott/tiger@db10g tables=EMP,DEPT directory=TEST_DIR dumpfile=EMP_DEPT.dmp logfile=impdpEMP_DEPT.log

  TABLE_EXISTS_ACTION = 附加参数允许将数据导入到现有表

 

3.对象导出/导入

  已经使用对象参数替换了exp的所有者参数,该参数用于指定要导出的模式

?  下面是对象导出和导入语法的示例

expdp scott/tiger@db10g schemas=SCOTT directory=TEST_DIR dumpfile=SCOTT.dmp logfile=expdpSCOTT.log

 

impdp scott/tiger@db10g schemas=SCOTT directory=TEST_DIR dumpfile=SCOTT.dmp logfile=impdpSCOTT.log

 

4.数据库导出/导入

  FULL的参数指定需要一个完整的数据库导出

?  下面是完整的数据库导出和导入语法的示例

expdp system/password@db10g full=Y directory=TEST_DIR dumpfile=DB10G.dmp logfile=expdpDB10G.log

 

impdp system/password@db10g full=Y directory=TEST_DIR dumpfile=DB10G.dmp logfile=impdpDB10G.log

 

5. INCLUDE and EXCLUDE

  INCLUDE和EXCLUDE参数可以用来限制对特定对象的导出/导入

  当使用INCLUDE参数时,只有它指定的对象将包含在导出/导入中。

  当使用EXCLUDE参数时,除它指定的所有对象都将包含在导出/导入中。

  这两个参数是互斥的,因此使用需要最少条目的参数来定义所需的结果

?  两个参数的基本语法是相同的

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

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

 

?  下面的SQL展示了如何将它们用作命令行参数

expdp scott/tiger@db10g schemas=SCOTT include=TABLE:"IN ('EMP', 'DEPT')" directory=TEST_DIR dumpfile=SCOTT.dmp logfile=expdpSCOTT.log

 

expdp scott/tiger@db10g schemas=SCOTT exclude=TABLE:"= 'BONUS'" directory=TEST_DIR dumpfile=SCOTT.dmp logfile=expdpSCOTT.log

 

  如果从命令行中使用该参数,根据当前的操作系统来定,该SQL中的特殊字符可能需要转义

?  因此,使用参数文件更容易

INCLUDE=TABLE,VIEW,PACKAGE:"LIKE '%API'"

 

or

 

INCLUDE=TABLE

INCLUDE=VIEW

INCLUDE=PACKAGE:"LIKE '%API'"

 

?  可以使用LIKE和操作符在语句中使用多个对象

EXCLUDE=SCHEMA:"LIKE 'SYS%'"

 

EXCLUDE=SCHEMA:"IN ('OUTLN','SYSTEM','SYSMAN','FLOWS_FILES','APEX_030200','APEX_PUBLIC_USER','ANONYMOUS')"

  有效的对象类型路径可以INCLUDEEXCLUDE可以显示使用DATABASE_EXPORT_OBJECTS SCHEMA_EXPORT_OBJECTS,TABLE_EXPORT_OBJECTS视图。

 

6.CONTENT and QUERY

CONTENT参数允许您更改导出的内容

?  下面的命令使用METADATA_ONLY参数值导出的内容模式不包括实际数据

expdp system/password@db10g schemas=SCOTT directory=TEST_DIR dumpfile=scott_meta.dmp logfile=expdp.log content=METADATA_ONLY

 

?  执行以下的SQL导出数据

expdp system/password@db10g schemas=SCOTT directory=TEST_DIR dumpfile=scott_data.dmp logfile=expdp.log content=DATA_ONLY

 

  查询参数允许您更改从一个或多个表导出的行

?  下面的示例执行一个完整的数据库导出,但是不包括EMPDEPT表的数据

expdp system/password@db10g full=Y directory=TEST_DIR dumpfile=full.dmp logfile=expdp_full.log query=SCOTT.EMP,SCOTT.DEPT:'"WHERE ROWNUM = 0"'

 

7.网络导出/导入(NETWORK_LINK

  NETWORK_LINK参数标识一个数据库链接作为一个网络的源使用导出/导入

?  下面的数据库链接将用于演示它的使用

CONN / AS SYSDBA

GRANT CREATE DATABASE LINK TO test;

 

CONN test/test

CREATE DATABASE LINK remote_scott CONNECT TO scott IDENTIFIED BY tiger USING 'DEV';

  对于导出NETWORK_LINK参数标识数据库链接指向源服务器

  对象以正常的方式从源服务器导出,但是写入到本地服务器上的一个目录对象,而不是源服务器上的一个目录对象

  本地和远程用户都需要授予他们EXP_FULL_DATABASE角色

expdp test/test@db10g tables=SCOTT.EMP network_link=REMOTE_SCOTT directory=TEST_DIR dumpfile=EMP.dmp logfile=expdpEMP.log

 

  对于导入NETWORK_LINK参数还确定数据库链接指向源服务器

  这里的区别在于,对象是直接从源导入到本地服务器的,而不需要将其写入转储文件

  本地和远程用户都需要IMP_FULL_DATABASE角色授予他们

impdp test/test@db10g tables=SCOTT.EMP network_link=REMOTE_SCOTT directory=TEST_DIR logfile=impdpSCOTT.log remap_schema=SCOTT:TEST

 

8.闪回导出

  Exp实用程序使用 =Y参数表示导出应该与某个时间点保持一致

  默认情况下,expdp实用程序导出在每个表的基础上都是一致的

  如果要导出的所有表在一致的同一时间点上,你需要使用FLASHBACK_SCNFLASHBACK_TIME参数

?  FLASHBACK_TIME参数值转换为指定的时间的相近的SCN

expdp ..... flashback_time=systimestamp

 

# In parameter file.

flashback_time="to_timestamp('09-05-2011 09:00:00', 'DD-MM-YYYY HH24:MI:SS')"

 

# Escaped on command line.

expdp ..... flashback_time=\"to_timestamp\(\'09-05-2011 09:00:00\', \'DD-MM-YYYY HH24:MI:SS\'\)\"

 

?  如果更倾向使用SCN,可以使用下面的一个查询来查询当前的SCN

SELECT current_scn FROM v$database;

SELECT DBMS_FLASHBACK.get_system_change_number FROM dual;

SELECT TIMESTAMP_TO_SCN(SYSTIMESTAMP) FROM dual;

 

?  然后使用FLASHBACK_SCN参数

expdp ..... flashback_scn=5474280

 

?  下面的查询可能对在时间戳和scn之间进行转换有帮助

SELECT TIMESTAMP_TO_SCN(SYSTIMESTAMP) FROM dual;

SELECT SCN_TO_TIMESTAMP(5474751) FROM dual;

 

9.杂项信息

  不像原始的expimp实用程序,所有的数据泵.dmp.日志文件是在Oracle服务器上创建的,而不是客户端机器。

  数据泵动作都是由多个作业(服务器进程不是DBMS_JOB)。这些作业由一个使用高级队列的主控制进程来控制

Export> status

 

Job: SYS_EXPORT_FULL_01

  Operation: EXPORT

  Mode: FULL

  State: EXECUTING

  Bytes Processed: 0

  Current Parallelism: 1

  Job Error Count: 0

  Dump File: D:\TEMP\DB10G.DMP

    bytes written: 4,096

 

Worker 1 Status:

  State: EXECUTING

  Object Schema: SYSMAN

  Object Name: MGMT_CONTAINER_CRED_ARRAY

  Object Type: DATABASE_EXPORT/SCHEMA/TYPE/TYPE_SPEC

  Completed Objects: 261

  Total Objects: 261

 

  利用并行参数可以改善数据泵的性能

  这应该结合使用“% U”通配符在DUMPFILE参数允许多个dumpfiles创建或读入

在导入期间可以使用相同的通配符,以允许引用多个文件。

expdp scott/tiger@db10g schemas=SCOTT directory=TEST_DIR parallel=4 dumpfile=SCOTT_%U.dmp logfile=expdpSCOTT.log

 

impdp scott/tiger@db10g schemas=SCOTT directory=TEST_DIR parallel=4 dumpfile=SCOTT_%U.dmp logfile=impdpSCOTT.log

 

?  使用DBA_DATAPUMP_JOBS视图来监控当前的工作

system@db10g> select * from dba_datapump_jobs;

 

OWNER_NAME                     JOB_NAME                       OPERATION

------------------------------ ------------------------------ ------------------------------

JOB_MODE                       STATE                              DEGREE ATTACHED_SESSIONS

------------------------------ ------------------------------ ---------- -----------------

SYSTEM                         SYS_EXPORT_FULL_01             EXPORT

FULL                           EXECUTING                               1                 1

 

10.数据泵API

  Oracle为数据泵提供了一个pl/sql API

?  下面显示如何使用该API来执行模式导出的示例

SET SERVEROUTPUT ON SIZE 1000000

DECLARE

  l_dp_handle       NUMBER;

  l_last_job_state  VARCHAR2(30) := 'UNDEFINED';

  l_job_state       VARCHAR2(30) := 'UNDEFINED';

  l_sts             KU$_STATUS;

BEGIN

  l_dp_handle := DBMS_DATAPUMP.open(

    operation   => 'EXPORT',

    job_mode    => 'SCHEMA',

    remote_link => NULL,

    job_name    => 'EMP_EXPORT',

    version     => 'LATEST');

 

  DBMS_DATAPUMP.add_file(

    handle    => l_dp_handle,

    filename  => 'SCOTT.dmp',

    directory => 'TEST_DIR');

 

  DBMS_DATAPUMP.add_file(

    handle    => l_dp_handle,

    filename  => 'SCOTT.log',

    directory => 'TEST_DIR',

    filetype  => DBMS_DATAPUMP.KU$_FILE_TYPE_LOG_FILE);

 

  DBMS_DATAPUMP.metadata_filter(

    handle => l_dp_handle,

    name   => 'SCHEMA_EXPR',

    value  => '= ''SCOTT''');

 

  DBMS_DATAPUMP.start_job(l_dp_handle);

 

  DBMS_DATAPUMP.detach(l_dp_handle);

END;

/

 

?  使用DBA_DATAPUMP_JOBS视图来监控当前的工作

system@db10g> select * from dba_datapump_jobs;

 

11.外部表(使用外部表卸载/加载数据)

  Oracle已经将数据泵技术的支持加入到外部表中

  ORACLE_DATAPUMP访问驱动程序可用于卸载数据数据泵出口文件,随后重新加载它

  当使用“AS”子句创建外部表时,数据的卸载就可以执行了

CREATE TABLE emp_xt

  ORGANIZATION EXTERNAL

   (

     TYPE ORACLE_DATAPUMP

     DEFAULT DIRECTORY test_dir

     LOCATION ('emp_xt.dmp')

   )

   AS SELECT * FROM emp;

 

?  可以使用下面的数据查询数据

SELECT * FROM emp_xt;

 

  创建指向现有文件的外部表的语法是类似的,但是没有“AS”语句

  例中,我们将使用相同的模式,但是在相同的实例中,或者在完全不同的实例中,这可能是不同的模式。

DROP TABLE emp_xt;

 

CREATE TABLE emp_xt (

  EMPNO     NUMBER(4),

  ENAME     VARCHAR2(10),

  JOB       VARCHAR2(9),

  MGR       NUMBER(4),

  HIREDATE  DATE,

  SAL       NUMBER(7,2),

  COMM      NUMBER(7,2),

  DEPTNO    NUMBER(2))

  ORGANIZATION EXTERNAL (

     TYPE ORACLE_DATAPUMP

     DEFAULT DIRECTORY test_dir

     LOCATION ('emp_xt.dmp')

  );

 

SELECT * FROM emp_xt;

  创建外部表使用ORACLE_DATAPUMP访问驱动程序仅限于转储文件创建外部表卸载

 

12.安全外部密码存储

  可以使用安全的外部密码存储来为数据泵提供凭据

$ expdp /@db10g_test tables=EMP,DEPT directory=TEST_DIR dumpfile=EMP_DEPT.dmp logfile=expdpEMP_DEPT.log

 

13.帮助

 The HELP=Y option displays the available parameters.

 

 13.1 expdp

expdp help=y

 

Export: Release 10.1.0.2.0 - Production on Tuesday, 23 March, 2004 8:33

 

Copyright (c) 2003, Oracle.  All rights reserved.

 

 

The Data Pump export utility provides a mechanism for transferring data objects

between Oracle databases. The utility is invoked with the following command:

 

   Example: expdp scott/tiger DIRECTORY=dmpdir DUMPFILE=scott.dmp

 

You can control how Export runs by entering the 'expdp' command followed

by various parameters. To specify parameters, you use keywords:

 

   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 partitioned table

 

USERID must be the first parameter on the command line.

 

Keyword               Description (Default)

------------------------------------------------------------------------------

ATTACH                Attach to existing job, e.g. ATTACH [=job name].

CONTENT               Specifies data to unload where the valid keywords are:

                      (ALL), DATA_ONLY, and METADATA_ONLY.

DIRECTORY             Directory object to be used for dumpfiles and logfiles.

DUMPFILE              List of destination dump files (expdat.dmp),

                      e.g. DUMPFILE=scott1.dmp, scott2.dmp, dmpdir:scott3.dmp.

ESTIMATE              Calculate job estimates where the valid keywords are:

                      (BLOCKS) and STATISTICS.

ESTIMATE_ONLY         Calculate job estimates without performing the export.

EXCLUDE               Exclude specific object types, e.g. EXCLUDE=TABLE:EMP.

FILESIZE              Specify the size of each dumpfile in units of bytes.

FLASHBACK_SCN         SCN used to set session snapshot back to.

FLASHBACK_TIME        Time used to get the SCN closest to the specified time.

FULL                  Export entire database (N).

HELP                  Display Help messages (N).

INCLUDE               Include specific object types, e.g. INCLUDE=TABLE_DATA.

JOB_NAME              Name of export job to create.

LOGFILE               Log file name (export.log).

NETWORK_LINK          Name of remote database link to the source system.

NOLOGFILE             Do not write logfile (N).

PARALLEL              Change the number of active workers for current job.

PARFILE               Specify parameter file.

QUERY                 Predicate clause used to export a subset of a table.

SCHEMAS               List of schemas to export (login schema).

STATUS                Frequency (secs) job status is to be monitored where

                      the default (0) will show new status when available.

TABLES                Identifies a list of tables to export - one schema only.

TABLESPACES           Identifies a list of tablespaces to export.

TRANSPORT_FULL_CHECK  Verify storage segments of all tables (N).

TRANSPORT_TABLESPACES List of tablespaces from which metadata will be unloaded.

VERSION               Version of objects to export where valid keywords are:

                      (COMPATIBLE), LATEST, or any valid database version.

 

The following commands are valid while in interactive mode.

Note: abbreviations are allowed

 

Command               Description

------------------------------------------------------------------------------

ADD_FILE              Add dumpfile to dumpfile set.

                      ADD_FILE=dumpfile-name

CONTINUE_CLIENT       Return to logging mode. Job will be re-started if idle.

EXIT_CLIENT           Quit client session and leave job running.

HELP                  Summarize interactive commands.

KILL_JOB              Detach and delete job.

PARALLEL              Change the number of active workers for current job.

                      PARALLEL=.

START_JOB             Start/resume current job.

STATUS                Frequency (secs) job status is to be monitored where

                      the default (0) will show new status when available.

                      STATUS=[interval]

STOP_JOB              Orderly shutdown of job execution and exits the client.

                      STOP_JOB=IMMEDIATE performs an immediate shutdown of the

                      Data Pump job.

Oracle 10 g版本2(10.2)添加以下参数

Keyword               Description (Default)

------------------------------------------------------------------------------

COMPRESSION           Reduce size of dumpfile contents where valid

                      keyword values are: (METADATA_ONLY) and NONE.

ENCRYPTION_PASSWORD   Password key for creating encrypted column data.

SAMPLE                Percentage of data to be exported;

 

The following commands are valid while in interactive mode.

Note: abbreviations are allowed

 

Command               Description

------------------------------------------------------------------------------

FILESIZE              Default filesize (bytes) for subsequent ADD_FILE commands.

 

Oracle 11 g版本1(11.1)添加以下参数

Keyword               Description (Default)

------------------------------------------------------------------------------

DATA_OPTIONS          Data layer flags where the only valid value is:

                      XML_CLOBS-write XML datatype in CLOB format

ENCRYPTION            Encrypt part or all of the dump file where valid keyword

                      values are: ALL, DATA_ONLY, METADATA_ONLY,

                      ENCRYPTED_COLUMNS_ONLY, or NONE.

ENCRYPTION_ALGORITHM  Specify how encryption should be done where valid

                      keyword values are: (AES128), AES192, and AES256.

ENCRYPTION_MODE       Method of generating encryption key where valid keyword

                      values are: DUAL, PASSWORD, and (TRANSPARENT).

REMAP_DATA            Specify a data conversion function,

                      e.g. REMAP_DATA=EMP.EMPNO:REMAPPKG.EMPNO.

REUSE_DUMPFILES       Overwrite destination dump file if it exists (N).

TRANSPORTABLE         Specify whether transportable method can be used where

                      valid keyword values are: ALWAYS, (NEVER).

 

The following commands are valid while in interactive mode.

Note: abbreviations are allowed

 

Command               Description

------------------------------------------------------------------------------

REUSE_DUMPFILES       Overwrite destination dump file if it exists (N).

Oracle 12c版本1(12.1)添加以下参数

ABORT_STEP

Stop the job after it is initialized or at the indicated object.

Valid values are -1 or N where N is zero or greater.

N corresponds to the object's process order number in the master table.

 

ACCESS_METHOD

Instructs Export to use a particular method to unload data.

Valid keyword values are: [AUTOMATIC], DIRECT_PATH and EXTERNAL_TABLE.

 

COMPRESSION_ALGORITHM

Specify the compression algorithm that should be used.

Valid keyword values are: [BASIC], LOW, MEDIUM and HIGH.

 

ENCRYPTION_PWD_PROMPT

Specifies whether to prompt for the encryption password.

Terminal echo will be suppressed while standard input is read.

 

KEEP_MASTER

Retain the master table after an export job that completes successfully [NO].

 

MASTER_ONLY

Import just the master table and then stop the job [NO].

 

METRICS

Report additional job information to the export log file [NO].

 

VIEWS_AS_TABLES

Identifies one or more views to be exported as tables.

For example, VIEWS_AS_TABLES=HR.EMP_DETAILS_VIEW.

 

 

12.2 IMPDP

impdp help=y

 

Import: Release 10.1.0.2.0 - Production on Saturday, 11 September, 2004 17:22

 

Copyright (c) 2003, Oracle.  All rights reserved.

 

 

The Data Pump Import utility provides a mechanism for transferring data objects

between Oracle databases. The utility is invoked with the following command:

 

     Example: impdp scott/tiger DIRECTORY=dmpdir DUMPFILE=scott.dmp

 

You can control how Import runs by entering the 'impdp' command followed

by various parameters. To specify parameters, you use keywords:

 

     Format:  impdp KEYWORD=value or KEYWORD=(value1,value2,...,valueN)

     Example: impdp scott/tiger DIRECTORY=dmpdir DUMPFILE=scott.dmp

 

USERID must be the first parameter on the command line.

 

Keyword               Description (Default)

------------------------------------------------------------------------------

ATTACH                Attach to existing job, e.g. ATTACH [=job name].

CONTENT               Specifies data to load where the valid keywords are:

                      (ALL), DATA_ONLY, and METADATA_ONLY.

DIRECTORY             Directory object to be used for dump, log, and sql files.

DUMPFILE              List of dumpfiles to import from (expdat.dmp),

                      e.g. DUMPFILE=scott1.dmp, scott2.dmp, dmpdir:scott3.dmp.

ESTIMATE              Calculate job estimates where the valid keywords are:

                      (BLOCKS) and STATISTICS.

EXCLUDE               Exclude specific object types, e.g. EXCLUDE=TABLE:EMP.

FLASHBACK_SCN         SCN used to set session snapshot back to.

FLASHBACK_TIME        Time used to get the SCN closest to the specified time.

FULL                  Import everything from source (Y).

HELP                  Display help messages (N).

INCLUDE               Include specific object types, e.g. INCLUDE=TABLE_DATA.

JOB_NAME              Name of import job to create.

LOGFILE               Log file name (import.log).

NETWORK_LINK          Name of remote database link to the source system.

NOLOGFILE             Do not write logfile.

PARALLEL              Change the number of active workers for current job.

PARFILE               Specify parameter file.

QUERY                 Predicate clause used to import a subset of a table.

REMAP_DATAFILE        Redefine datafile references in all DDL statements.

REMAP_SCHEMA          Objects from one schema are loaded into another schema.

REMAP_TABLESPACE      Tablespace object are remapped to another tablespace.

REUSE_DATAFILES       Tablespace will be initialized if it already exists (N).

SCHEMAS               List of schemas to import.

SKIP_UNUSABLE_INDEXES Skip indexes that were set to the Index Unusable state.

SQLFILE               Write all the SQL DDL to a specified file.

STATUS                Frequency (secs) job status is to be monitored where

                      the default (0) will show new status when available.

STREAMS_CONFIGURATION Enable the loading of Streams metadata

TABLE_EXISTS_ACTION   Action to take if imported object already exists.

                      Valid keywords: (SKIP), APPEND, REPLACE and TRUNCATE.

TABLES                Identifies a list of tables to import.

TABLESPACES           Identifies a list of tablespaces to import.

TRANSFORM             Metadata transform to apply (Y/N) to specific objects.

                      Valid transform keywords: SEGMENT_ATTRIBUTES and STORAGE.

                      ex. TRANSFORM=SEGMENT_ATTRIBUTES:N:TABLE.

TRANSPORT_DATAFILES   List of datafiles to be imported by transportable mode.

TRANSPORT_FULL_CHECK  Verify storage segments of all tables (N).

TRANSPORT_TABLESPACES List of tablespaces from which metadata will be loaded.

                      Only valid in NETWORK_LINK mode import operations.

VERSION               Version of objects to export where valid keywords are:

                      (COMPATIBLE), LATEST, or any valid database version.

                      Only valid for NETWORK_LINK and SQLFILE.

 

The following commands are valid while in interactive mode.

Note: abbreviations are allowed

 

Command               Description (Default)11g

------------------------------------------------------------------------------

CONTINUE_CLIENT       Return to logging mode. Job will be re-started if idle.

EXIT_CLIENT           Quit client session and leave job running.

HELP                  Summarize interactive commands.

KILL_JOB              Detach and delete job.

PARALLEL              Change the number of active workers for current job.

                      PARALLEL=.

START_JOB             Start/resume current job.

                      START_JOB=SKIP_CURRENT will start the job after skipping

                      any action which was in progress when job was stopped.

STATUS                Frequency (secs) job status is to be monitored where

                      the default (0) will show new status when available.

                      STATUS=[interval]

STOP_JOB              Orderly shutdown of job execution and exits the client.

                      STOP_JOB=IMMEDIATE performs an immediate shutdown of the

                      Data Pump job.

 

Oracle 10 g版本2(10.2)添加以下参数

Keyword               Description (Default)

------------------------------------------------------------------------------

ENCRYPTION_PASSWORD   Password key for accessing encrypted column data.

                      This parameter is not valid for network import jobs.

 

Oracle 11 g版本1(11.1)添加以下参数

Keyword               Description (Default)

------------------------------------------------------------------------------

DATA_OPTIONS          Data layer flags where the only valid value is:

                      SKIP_CONSTRAINT_ERRORS-constraint errors are not fatal.

PARTITION_OPTIONS     Specify how partitions should be transformed where the

                      valid keywords are: DEPARTITION, MERGE and (NONE)

REMAP_DATA            Specify a data conversion function,

                      e.g. REMAP_DATA=EMP.EMPNO:REMAPPKG.EMPNO

REMAP_TABLE           Table names are remapped to another table.

                      For example, REMAP_TABLE=HR.EMPLOYEES:EMPS.

 

Oracle 11 g版本2(11.2)改变帮助输出的格式以及添加以下参数

CLUSTER

Utilize cluster resources and distribute workers across the Oracle RAC.

Valid keyword values are: [Y] and N.

 

SERVICE_NAME

Name of an active Service and associated resource group to constrain Oracle RAC resources.

 

SOURCE_EDITION

Edition to be used for extracting metadata.

 

TARGET_EDITION

Edition to be used for loading metadata.

 

 

Oracle 12 c版本1(12.1)添加以下参数

ABORT_STEP

Stop the job after it is initialized or at the indicated object.

Valid values are -1 or N where N is zero or greater.

N corresponds to the object's process order number in the master table.

 

ACCESS_METHOD

Instructs Export to use a particular method to unload data.

Valid keyword values are: [AUTOMATIC], DIRECT_PATH and EXTERNAL_TABLE.

 

ENCRYPTION_PWD_PROMPT

Specifies whether to prompt for the encryption password.

Terminal echo will be suppressed while standard input is read.

 

KEEP_MASTER

Retain the master table after an export job that completes successfully [NO].

 

MASTER_ONLY

Import just the master table and then stop the job [NO].

 

METRICS

Report additional job information to the export log file [NO].

 

TRANSPORTABLE

Options for choosing transportable data movement.

Valid keywords are: ALWAYS and [NEVER].

Only valid in NETWORK_LINK mode import operations.

 

VIEWS_AS_TABLES

Identifies one or more views to be imported as tables.

For example, VIEWS_AS_TABLES=HR.EMP_DETAILS_VIEW.

Note that in network import mode, a table name may be appended

to the view name.

 

Oracle 12 c版本2(12.2)添加以下参数

STOP_WORKER

Stops a hung or stuck worker.

 

TRACE

Set trace/debug flags for the current job.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

阅读(1709) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~