本文以文章Datapump Export (Everything you need to know) 为框架,增加了个人的理解和测试用例。

还有,对于特别简单的选项没有介绍,如COMPRESSION,ENCRYPTION。对于涉及RAC的也没有介绍。

实验环境和说明文档均为Oracle Database 19c。

The Oracle Data Pump Export utility is used to unload data and metadata into a set of operating system files, which are called a dump file set.
Oracle 数据泵导出工具(Data Pump Export)用于将数据与元数据导出为一组操作系统文件,这类文件统称为转储文件集。

下面我们将逐个解释Datapump Export的关键参数,并配合示例说明。示例数据源为Oracle Database 19c HR sample schema。

SQLFILE

第一个介绍的其实是一个impdp的选项,他可以从expdp导出文件中抽取DDL。

The Oracle Data Pump Import command-line mode SQLFILE parameter specifies a file into which all the SQL DDL that Import prepares to execute is written, based on other Import parameters selected.

例如我们先做一个table mode export:

expdp hr@orclpdb1 tables=employees directory=data_pump_dir dumpfile=employees.dmp

然后提取DDL:

impdp hr@orclpdb1 directory=data_pump_dir dumpfile=expdat.dmp SQLFILE=expdp.sql

在文件中可以看到建表,主键和索引的DDL信息:

$ grep "CREATE TABLE" expdp.sql
CREATE TABLE "HR"."EMPLOYEES"

$ grep "CREATE INDEX" expdp.sql
CREATE INDEX "HR"."EMP_DEPARTMENT_IX" ON "HR"."EMPLOYEES" ("DEPARTMENT_ID")
CREATE INDEX "HR"."EMP_JOB_IX" ON "HR"."EMPLOYEES" ("JOB_ID")
CREATE INDEX "HR"."EMP_MANAGER_IX" ON "HR"."EMPLOYEES" ("MANAGER_ID")
CREATE INDEX "HR"."EMP_NAME_IX" ON "HR"."EMPLOYEES" ("LAST_NAME", "FIRST_NAME")

$ grep PRIMARY expdp.sql
ALTER TABLE "HR"."EMPLOYEES" ADD CONSTRAINT "EMP_EMP_ID_PK" PRIMARY KEY ("EMPLOYEE_ID")

$ grep UNIQUE expdp.sql
CREATE UNIQUE INDEX "HR"."EMP_EMP_ID_PK" ON "HR"."EMPLOYEES" ("EMPLOYEE_ID")
ALTER TABLE "HR"."EMPLOYEES" ADD CONSTRAINT "EMP_EMAIL_UK" UNIQUE ("EMAIL")

在下面的示例中,我们还会用到impdp SQLFILE 来验证expdp文件。

EXCLUDE

The Data Pump Export command-line utility EXCLUDE parameter enables you to filter the metadata that is exported by specifying objects and object types that you want to exclude from the export operation.

以下为table export,假设没有EXCLUDE参数,则会导出表定义,数据,索引,赋权,约束等。

$ expdp hr@orclpdb1 tables=employees directory=data_pump_dir dumpfile=employees.dmp

Export: Release 19.0.0.0.0 - Production on Thu Jul 9 09:48:40 2026
Version 19.3.0.0.0

Copyright (c) 1982, 2019, Oracle and/or its affiliates.  All rights reserved.
Password:

Connected to: Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Starting "HR"."SYS_EXPORT_TABLE_01":  hr/********@orclpdb1 tables=employees directory=data_pump_dir dumpfile=employees.dmp
Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
Processing object type TABLE_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
Processing object type TABLE_EXPORT/TABLE/STATISTICS/MARKER
Processing object type TABLE_EXPORT/TABLE/TABLE
Processing object type TABLE_EXPORT/TABLE/GRANT/OWNER_GRANT/OBJECT_GRANT
Processing object type TABLE_EXPORT/TABLE/COMMENT
Processing object type TABLE_EXPORT/TABLE/INDEX/INDEX
Processing object type TABLE_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
Processing object type TABLE_EXPORT/TABLE/CONSTRAINT/REF_CONSTRAINT
Processing object type TABLE_EXPORT/TABLE/TRIGGER
. . exported "HR"."EMPLOYEES"                            17.00 KB     106 rows
Master table "HR"."SYS_EXPORT_TABLE_01" successfully loaded/unloaded
******************************************************************************
Dump file set for HR.SYS_EXPORT_TABLE_01 is:
  /opt/oracle/admin/ORCLCDB/dpdump/3D77A45F182E529EE0630101007FC189/employees.dmp
Job "HR"."SYS_EXPORT_TABLE_01" successfully completed at Thu Jul 9 09:49:11 2026 elapsed 0 00:00:27

注意日志重的Processing object type部分,这实际上告诉了我们导出的对象,也称为object path。如果你想排除某部分,就把他加到EXCLUDE后面即可。

例如,在以下table mode export中,如果我们希望排除索引:

$ expdp hr@orclpdb1 tables=employees directory=data_pump_dir dumpfile=employees.dmp exclude=INDEX

Export: Release 19.0.0.0.0 - Production on Thu Jul 9 09:56:24 2026
Version 19.3.0.0.0

Copyright (c) 1982, 2019, Oracle and/or its affiliates.  All rights reserved.
Password:

Connected to: Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Starting "HR"."SYS_EXPORT_TABLE_01":  hr/********@orclpdb1 tables=employees directory=data_pump_dir dumpfile=employees.dmp exclude=INDEX
Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
Processing object type TABLE_EXPORT/TABLE/STATISTICS/MARKER
Processing object type TABLE_EXPORT/TABLE/TABLE
Processing object type TABLE_EXPORT/TABLE/GRANT/OWNER_GRANT/OBJECT_GRANT
Processing object type TABLE_EXPORT/TABLE/COMMENT
Processing object type TABLE_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
Processing object type TABLE_EXPORT/TABLE/CONSTRAINT/REF_CONSTRAINT
Processing object type TABLE_EXPORT/TABLE/TRIGGER
. . exported "HR"."EMPLOYEES"                            17.00 KB     106 rows
Master table "HR"."SYS_EXPORT_TABLE_01" successfully loaded/unloaded
******************************************************************************
Dump file set for HR.SYS_EXPORT_TABLE_01 is:
  /opt/oracle/admin/ORCLCDB/dpdump/3D77A45F182E529EE0630101007FC189/employees.dmp
Job "HR"."SYS_EXPORT_TABLE_01" successfully completed at Thu Jul 9 09:56:48 2026 elapsed 0 00:00:21

首先在日志中已经没有INDEX对象了,然后用impdp验证:

$ impdp hr@orclpdb1 directory=data_pump_dir dumpfile=employees.dmp SQLFILE=expdp.sql
$ grep "CREATE INDEX" expdp.sql
$ grep PRIMARY expdp.sql
ALTER TABLE "HR"."EMPLOYEES" ADD CONSTRAINT "EMP_EMP_ID_PK" PRIMARY KEY ("EMPLOYEE_ID")
$ grep UNIQUE expdp.sql
ALTER TABLE "HR"."EMPLOYEES" ADD CONSTRAINT "EMP_EMAIL_UK" UNIQUE ("EMAIL")

索引确实没有了。

💡 主键和UNIQUE都是约束,而非索引。

假设只想排除某个索引:

$ expdp hr@orclpdb1 tables=employees directory=data_pump_dir dumpfile=employees.dmp exclude=INDEX:"IN('EMP_NAME_IX')"

验证:

$ impdp hr@orclpdb1 directory=data_pump_dir dumpfile=employees.dmp SQLFILE=expdp.sql
$ grep EMP_NAME_IX expdp.sql
$

💡 INDEX后面的内容不能包含空格,例如不能写成INDEX:"IN ('EMP_NAME_IX')"

使用命令行,其实更推荐以下的写法,这样空格也没有问题了:

$ expdp hr@orclpdb1 tables=employees directory=data_pump_dir dumpfile=employees.dmp include=INDEX:\"IN \(\'EMP_NAME_IX\'\)\"

💡 为避免转义的问题,推荐使用PARFILE参数

INCLUDE

The Data Pump Export command-line utility INCLUDE parameter enables you to filter the metadata that is exported by specifying objects and object types for the current export mode. The specified objects and all their dependent objects are exported. Grants on these objects are also exported.

这句话有2点需要澄清:

  1. 这里所说的dependent objects 和referenced objects是有区别的,导出视图或存储过程并不会导出其引用的表的定义和数据。
  2. 只导出INCLUDE显示指定的对象,其他不会导出

关于第2点,文档也有说明:

Only object types explicitly specified in INCLUDE statements, and their dependent objects, are exported. No other object types, including the schema definition information that is normally part of a schema-mode export when you have the DATAPUMP_EXP_FULL_DATABASE role, are exported.

示例,假设我们只需要导出某索引:

$ expdp hr@orclpdb1 tables=employees directory=data_pump_dir dumpfile=employees.dmp include=INDEX:"IN('EMP_NAME_IX')"

验证:

$ impdp hr@orclpdb1 directory=data_pump_dir dumpfile=employees.dmp SQLFILE=expdp.sql

Import: Release 19.0.0.0.0 - Production on Thu Jul 9 10:31:11 2026
Version 19.3.0.0.0

Copyright (c) 1982, 2019, Oracle and/or its affiliates.  All rights reserved.
Password:

Connected to: Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Master table "HR"."SYS_SQL_FILE_FULL_01" successfully loaded/unloaded
Starting "HR"."SYS_SQL_FILE_FULL_01":  hr/********@orclpdb1 directory=data_pump_dir dumpfile=employees.dmp SQLFILE=expdp.sql
Processing object type TABLE_EXPORT/TABLE/INDEX/INDEX
Processing object type TABLE_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
Job "HR"."SYS_SQL_FILE_FULL_01" successfully completed at Thu Jul 9 10:31:16 2026 elapsed 0 00:00:02

$ cat expdp.sql
-- CONNECT HR
ALTER SESSION SET EVENTS '10150 TRACE NAME CONTEXT FOREVER, LEVEL 1';
ALTER SESSION SET EVENTS '10904 TRACE NAME CONTEXT FOREVER, LEVEL 1';
ALTER SESSION SET EVENTS '25475 TRACE NAME CONTEXT FOREVER, LEVEL 1';
ALTER SESSION SET EVENTS '10407 TRACE NAME CONTEXT FOREVER, LEVEL 1';
ALTER SESSION SET EVENTS '10851 TRACE NAME CONTEXT FOREVER, LEVEL 1';
ALTER SESSION SET EVENTS '22830 TRACE NAME CONTEXT FOREVER, LEVEL 192 ';
-- new object type path: TABLE_EXPORT/TABLE/INDEX/INDEX
CREATE INDEX "HR"."EMP_NAME_IX" ON "HR"."EMPLOYEES" ("LAST_NAME", "FIRST_NAME")
  PCTFREE 10 INITRANS 2 MAXTRANS 255
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "USERS" PARALLEL 1 ;

  ALTER INDEX "HR"."EMP_NAME_IX" NOPARALLEL;
-- new object type path: TABLE_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS

QUERY

The Oracle Data Pump Export command-line utility QUERY parameter enables you to specify a query clause that is used to filter the data that gets exported.

QUERY可以过滤数据,相当于WHERE条件。

已知薪水大于10000的员工为15人:

select count(*) from hr.employees where salary > 10000;
15

示例:

$ expdp hr@orclpdb1 DIRECTORY=data_pump_dir DUMPFILE=employees.dmp TABLES=employees REUSE_DUMPFILES=YES QUERY='hr.employees:"where salary>10000"'

Export: Release 19.0.0.0.0 - Production on Thu Jul 9 10:46:33 2026
Version 19.3.0.0.0

Copyright (c) 1982, 2019, Oracle and/or its affiliates.  All rights reserved.
Password:

Connected to: Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Starting "HR"."SYS_EXPORT_TABLE_01":  hr/********@orclpdb1 DIRECTORY=data_pump_dir DUMPFILE=employees.dmp TABLES=employees REUSE_DUMPFILES=YES QUERY=hr.employees:"where salary>10000"
Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
Processing object type TABLE_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
Processing object type TABLE_EXPORT/TABLE/STATISTICS/MARKER
Processing object type TABLE_EXPORT/TABLE/TABLE
Processing object type TABLE_EXPORT/TABLE/GRANT/OWNER_GRANT/OBJECT_GRANT
Processing object type TABLE_EXPORT/TABLE/COMMENT
Processing object type TABLE_EXPORT/TABLE/INDEX/INDEX
Processing object type TABLE_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
Processing object type TABLE_EXPORT/TABLE/CONSTRAINT/REF_CONSTRAINT
Processing object type TABLE_EXPORT/TABLE/TRIGGER
. . exported "HR"."EMPLOYEES"                            10.61 KB      15 rows
Master table "HR"."SYS_EXPORT_TABLE_01" successfully loaded/unloaded
******************************************************************************
Dump file set for HR.SYS_EXPORT_TABLE_01 is:
  /opt/oracle/admin/ORCLCDB/dpdump/3D77A45F182E529EE0630101007FC189/employees.dmp
Job "HR"."SYS_EXPORT_TABLE_01" successfully completed at Thu Jul 9 10:46:58 2026 elapsed 0 00:00:22

ESTIMATE

The Oracle Data Pump Export command-line utility ESTIMATE parameter specifies the method that Export uses to estimate how much disk space each table in the export job will consume (in bytes).

ESTIMATE无法是在导出时,打印一个估算信息而已。

示例:

$ expdp hr@orclpdb1 tables=employees directory=data_pump_dir dumpfile=employees.dmp estimate=statistics

Export: Release 19.0.0.0.0 - Production on Thu Jul 9 11:00:35 2026
Version 19.3.0.0.0

Copyright (c) 1982, 2019, Oracle and/or its affiliates.  All rights reserved.
Password:

Connected to: Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Starting "HR"."SYS_EXPORT_TABLE_01":  hr/********@orclpdb1 tables=employees directory=data_pump_dir dumpfile=employees.dmp estimate=statistics
Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
.  estimated "HR"."EMPLOYEES"                            15.95 KB
Processing object type TABLE_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
Processing object type TABLE_EXPORT/TABLE/STATISTICS/MARKER
Processing object type TABLE_EXPORT/TABLE/TABLE
Processing object type TABLE_EXPORT/TABLE/GRANT/OWNER_GRANT/OBJECT_GRANT
Processing object type TABLE_EXPORT/TABLE/COMMENT
Processing object type TABLE_EXPORT/TABLE/INDEX/INDEX
Processing object type TABLE_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
Processing object type TABLE_EXPORT/TABLE/CONSTRAINT/REF_CONSTRAINT
Processing object type TABLE_EXPORT/TABLE/TRIGGER
. . exported "HR"."EMPLOYEES"                            17.00 KB     106 rows
Master table "HR"."SYS_EXPORT_TABLE_01" successfully loaded/unloaded
******************************************************************************
Dump file set for HR.SYS_EXPORT_TABLE_01 is:
  /opt/oracle/admin/ORCLCDB/dpdump/3D77A45F182E529EE0630101007FC189/employees.dmp
Job "HR"."SYS_EXPORT_TABLE_01" successfully completed at Thu Jul 9 11:01:00 2026 elapsed 0 00:00:21

ESTIMATE_ONLY

ESTIMATE_ONLY不会执行导出,因此dumpfile参数也就不必要了。

$ expdp hr@orclpdb1 tables=employees directory=data_pump_dir estimate_only=yes

Export: Release 19.0.0.0.0 - Production on Thu Jul 9 11:04:45 2026
Version 19.3.0.0.0

Copyright (c) 1982, 2019, Oracle and/or its affiliates.  All rights reserved.
Password:

Connected to: Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Starting "HR"."SYS_EXPORT_TABLE_01":  hr/********@orclpdb1 tables=employees directory=data_pump_dir estimate_only=yes
Estimate in progress using BLOCKS method...
Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
.  estimated "HR"."EMPLOYEES"                               64 KB
Total estimation using BLOCKS method: 64 KB
Job "HR"."SYS_EXPORT_TABLE_01" successfully completed at Thu Jul 9 11:04:53 2026 elapsed 0 00:00:05

FULL

The Export command-line FULL parameter specifies that you want to perform a full database mode export

两个概念:

  • full export mode需要DATAPUMP_EXP_FULL_DATABASE 角色权限
  • full export mode和table export mode是互斥的

例如:

$ expdp hr@orclpdb1  full=y directory=data_pump_dir

Export: Release 19.0.0.0.0 - Production on Thu Jul 9 11:08:35 2026
Version 19.3.0.0.0

Copyright (c) 1982, 2019, Oracle and/or its affiliates.  All rights reserved.
Password:

Connected to: Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
ORA-31631: privileges are required
ORA-39161: Full database jobs require privileges

$ expdp hr@orclpdb1 tables=employees full=y directory=data_pump_dir

Export: Release 19.0.0.0.0 - Production on Thu Jul 9 11:07:35 2026
Version 19.3.0.0.0

Copyright (c) 1982, 2019, Oracle and/or its affiliates.  All rights reserved.
Password:

Connected to: Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
UDE-00010: multiple job modes requested, full and tables.

记录一个完整的full mode export,针对的就是Oracle 19c sample schema:

$ time expdp system@orclpdb1  full=y directory=data_pump_dir

Export: Release 19.0.0.0.0 - Production on Thu Jul 9 11:11:46 2026
Version 19.3.0.0.0

Copyright (c) 1982, 2019, Oracle and/or its affiliates.  All rights reserved.
Password:

UDE-28002: operation generated ORACLE error 28002
ORA-28002: the password will expire within 7 days

Connected to: Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Starting "SYSTEM"."SYS_EXPORT_FULL_01":  system/********@orclpdb1 full=y directory=data_pump_dir
Processing object type DATABASE_EXPORT/EARLY_OPTIONS/VIEWS_AS_TABLES/TABLE_DATA
Processing object type DATABASE_EXPORT/NORMAL_OPTIONS/TABLE_DATA
Processing object type DATABASE_EXPORT/NORMAL_OPTIONS/VIEWS_AS_TABLES/TABLE_DATA
Processing object type DATABASE_EXPORT/SCHEMA/TABLE/TABLE_DATA
Processing object type DATABASE_EXPORT/SCHEMA/PACKAGE_BODIES/PACKAGE/PACKAGE_BODY
Processing object type DATABASE_EXPORT/SCHEMA/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
Processing object type DATABASE_EXPORT/SCHEMA/TABLE/INDEX/STATISTICS/FUNCTIONAL_INDEX/INDEX_STATISTICS
Processing object type DATABASE_EXPORT/SCHEMA/TABLE/INDEX/STATISTICS/BITMAP_INDEX/INDEX_STATISTICS
Processing object type DATABASE_EXPORT/SCHEMA/TABLE/STATISTICS/TABLE_STATISTICS
Processing object type DATABASE_EXPORT/STATISTICS/MARKER
Processing object type DATABASE_EXPORT/PRE_SYSTEM_IMPCALLOUT/MARKER
Processing object type DATABASE_EXPORT/PRE_INSTANCE_IMPCALLOUT/MARKER
Processing object type DATABASE_EXPORT/TABLESPACE
Processing object type DATABASE_EXPORT/PROFILE
Processing object type DATABASE_EXPORT/SCHEMA/USER
Processing object type DATABASE_EXPORT/RADM_FPTM
Processing object type DATABASE_EXPORT/GRANT/SYSTEM_GRANT/PROC_SYSTEM_GRANT
Processing object type DATABASE_EXPORT/SCHEMA/GRANT/SYSTEM_GRANT
Processing object type DATABASE_EXPORT/SCHEMA/ROLE_GRANT
Processing object type DATABASE_EXPORT/SCHEMA/DEFAULT_ROLE
Processing object type DATABASE_EXPORT/SCHEMA/ON_USER_GRANT
Processing object type DATABASE_EXPORT/SCHEMA/TABLESPACE_QUOTA
Processing object type DATABASE_EXPORT/RESOURCE_COST
Processing object type DATABASE_EXPORT/TRUSTED_DB_LINK
Processing object type DATABASE_EXPORT/SCHEMA/SEQUENCE/SEQUENCE
Processing object type DATABASE_EXPORT/DIRECTORY/DIRECTORY
Processing object type DATABASE_EXPORT/DIRECTORY/GRANT/OWNER_GRANT/OBJECT_GRANT
Processing object type DATABASE_EXPORT/SCHEMA/SYNONYM
Processing object type DATABASE_EXPORT/SCHEMA/TYPE/INC_TYPE
Processing object type DATABASE_EXPORT/SCHEMA/TYPE/TYPE_SPEC
Processing object type DATABASE_EXPORT/SCHEMA/TYPE/GRANT/OWNER_GRANT/OBJECT_GRANT
Processing object type DATABASE_EXPORT/SYSTEM_PROCOBJACT/PRE_SYSTEM_ACTIONS/PROCACT_SYSTEM
Processing object type DATABASE_EXPORT/SYSTEM_PROCOBJACT/PROCOBJ
Processing object type DATABASE_EXPORT/SYSTEM_PROCOBJACT/POST_SYSTEM_ACTIONS/PROCACT_SYSTEM
Processing object type DATABASE_EXPORT/SCHEMA/PROCACT_SCHEMA
Processing object type DATABASE_EXPORT/EARLY_OPTIONS/VIEWS_AS_TABLES/TABLE
Processing object type DATABASE_EXPORT/EARLY_POST_INSTANCE_IMPCALLOUT/MARKER
Processing object type DATABASE_EXPORT/SCHEMA/XMLSCHEMA/XMLSCHEMA
Processing object type DATABASE_EXPORT/NORMAL_OPTIONS/TABLE
Processing object type DATABASE_EXPORT/NORMAL_OPTIONS/VIEWS_AS_TABLES/TABLE
Processing object type DATABASE_EXPORT/NORMAL_POST_INSTANCE_IMPCALLOUT/MARKER
Processing object type DATABASE_EXPORT/SCHEMA/TABLE/TABLE
Processing object type DATABASE_EXPORT/SCHEMA/TABLE/GRANT/OWNER_GRANT/OBJECT_GRANT
Processing object type DATABASE_EXPORT/SCHEMA/TABLE/COMMENT
Processing object type DATABASE_EXPORT/SCHEMA/PACKAGE/PACKAGE_SPEC
Processing object type DATABASE_EXPORT/SCHEMA/PACKAGE/CODE_BASE_GRANT
Processing object type DATABASE_EXPORT/SCHEMA/FUNCTION/FUNCTION
Processing object type DATABASE_EXPORT/SCHEMA/PROCEDURE/PROCEDURE
Processing object type DATABASE_EXPORT/SCHEMA/PACKAGE/COMPILE_PACKAGE/PACKAGE_SPEC/ALTER_PACKAGE_SPEC
Processing object type DATABASE_EXPORT/SCHEMA/FUNCTION/ALTER_FUNCTION
Processing object type DATABASE_EXPORT/SCHEMA/PROCEDURE/ALTER_PROCEDURE
Processing object type DATABASE_EXPORT/SCHEMA/VIEW/VIEW
Processing object type DATABASE_EXPORT/SCHEMA/VIEW/COMMENT
Processing object type DATABASE_EXPORT/SCHEMA/TYPE/TYPE_BODY
Processing object type DATABASE_EXPORT/SCHEMA/TABLE/INDEX/INDEX
Processing object type DATABASE_EXPORT/SCHEMA/TABLE/INDEX/FUNCTIONAL_INDEX/INDEX
Processing object type DATABASE_EXPORT/SCHEMA/TABLE/CONSTRAINT/CONSTRAINT
Processing object type DATABASE_EXPORT/SCHEMA/TABLE/CONSTRAINT/REF_CONSTRAINT
Processing object type DATABASE_EXPORT/SCHEMA/TABLE/INDEX/BITMAP_INDEX/INDEX
Processing object type DATABASE_EXPORT/SCHEMA/TABLE/INDEX/DOMAIN_INDEX/INDEX
Processing object type DATABASE_EXPORT/SCHEMA/TABLE/TRIGGER
Processing object type DATABASE_EXPORT/SCHEMA/VIEW/TRIGGER
Processing object type DATABASE_EXPORT/SCHEMA/MATERIALIZED_VIEW
Processing object type DATABASE_EXPORT/SCHEMA/DIMENSION
Processing object type DATABASE_EXPORT/FINAL_POST_INSTANCE_IMPCALLOUT/MARKER
Processing object type DATABASE_EXPORT/SCHEMA/TABLE/POST_INSTANCE/PROCACT_INSTANCE
Processing object type DATABASE_EXPORT/SCHEMA/TABLE/POST_INSTANCE/PROCDEPOBJ
Processing object type DATABASE_EXPORT/SCHEMA/POST_SCHEMA/PROCOBJ
Processing object type DATABASE_EXPORT/SCHEMA/POST_SCHEMA/PROCACT_SCHEMA
Processing object type DATABASE_EXPORT/AUDIT_UNIFIED/AUDIT_POLICY_ENABLE
Processing object type DATABASE_EXPORT/POST_SYSTEM_IMPCALLOUT/MARKER
. . exported "SYS"."KU$_USER_MAPPING_VIEW"               6.187 KB      47 rows
. . exported "AUDSYS"."AUD$UNIFIED":"SYS_P281"           294.6 KB     302 rows
. . exported "AUDSYS"."AUD$UNIFIED":"SYS_P621"           94.82 KB      98 rows
. . exported "AUDSYS"."AUD$UNIFIED":"SYS_P1209"          56.81 KB      14 rows
. . exported "AUDSYS"."AUD$UNIFIED":"SYS_P945"           52.07 KB       4 rows
. . exported "SYSTEM"."REDO_DB"                          25.59 KB       1 rows
. . exported "WMSYS"."WM$WORKSPACES_TABLE$"              12.10 KB       1 rows
. . exported "WMSYS"."WM$HINT_TABLE$"                    9.984 KB      97 rows
. . exported "LBACSYS"."OLS$INSTALLATIONS"               6.960 KB       2 rows
. . exported "WMSYS"."WM$WORKSPACE_PRIV_TABLE$"          7.078 KB      11 rows
. . exported "SYS"."DAM_CONFIG_PARAM$"                   6.531 KB      14 rows
. . exported "SYS"."TSDP_SUBPOL$"                        6.328 KB       1 rows
. . exported "WMSYS"."WM$NEXTVER_TABLE$"                 6.375 KB       1 rows
. . exported "LBACSYS"."OLS$PROPS"                       6.234 KB       5 rows
. . exported "WMSYS"."WM$ENV_VARS$"                      6.015 KB       3 rows
. . exported "SYS"."TSDP_PARAMETER$"                     5.953 KB       1 rows
. . exported "SYS"."TSDP_POLICY$"                        5.921 KB       1 rows
. . exported "WMSYS"."WM$VERSION_HIERARCHY_TABLE$"       5.984 KB       1 rows
. . exported "WMSYS"."WM$EVENTS_INFO$"                   5.812 KB      12 rows
. . exported "LBACSYS"."OLS$AUDIT_ACTIONS"               5.757 KB       8 rows
. . exported "LBACSYS"."OLS$DIP_EVENTS"                  5.539 KB       2 rows
. . exported "AUDSYS"."AUD$UNIFIED":"AUD_UNIFIED_P0"         0 KB       0 rows
. . exported "LBACSYS"."OLS$AUDIT"                           0 KB       0 rows
. . exported "LBACSYS"."OLS$COMPARTMENTS"                    0 KB       0 rows
. . exported "LBACSYS"."OLS$DIP_DEBUG"                       0 KB       0 rows
. . exported "LBACSYS"."OLS$GROUPS"                          0 KB       0 rows
. . exported "LBACSYS"."OLS$LAB"                             0 KB       0 rows
. . exported "LBACSYS"."OLS$LEVELS"                          0 KB       0 rows
. . exported "LBACSYS"."OLS$POL"                             0 KB       0 rows
. . exported "LBACSYS"."OLS$POLICY_ADMIN"                    0 KB       0 rows
. . exported "LBACSYS"."OLS$POLS"                            0 KB       0 rows
. . exported "LBACSYS"."OLS$POLT"                            0 KB       0 rows
. . exported "LBACSYS"."OLS$PROFILE"                         0 KB       0 rows
. . exported "LBACSYS"."OLS$PROFILES"                        0 KB       0 rows
. . exported "LBACSYS"."OLS$PROG"                            0 KB       0 rows
. . exported "LBACSYS"."OLS$SESSINFO"                        0 KB       0 rows
. . exported "LBACSYS"."OLS$USER"                            0 KB       0 rows
. . exported "LBACSYS"."OLS$USER_COMPARTMENTS"               0 KB       0 rows
. . exported "LBACSYS"."OLS$USER_GROUPS"                     0 KB       0 rows
. . exported "LBACSYS"."OLS$USER_LEVELS"                     0 KB       0 rows
. . exported "SYS"."AUD$"                                    0 KB       0 rows
. . exported "SYS"."DAM_CLEANUP_EVENTS$"                     0 KB       0 rows
. . exported "SYS"."DAM_CLEANUP_JOBS$"                       0 KB       0 rows
. . exported "SYS"."TSDP_ASSOCIATION$"                       0 KB       0 rows
. . exported "SYS"."TSDP_CONDITION$"                         0 KB       0 rows
. . exported "SYS"."TSDP_FEATURE_POLICY$"                    0 KB       0 rows
. . exported "SYS"."TSDP_PROTECTION$"                        0 KB       0 rows
. . exported "SYS"."TSDP_SENSITIVE_DATA$"                    0 KB       0 rows
. . exported "SYS"."TSDP_SENSITIVE_TYPE$"                    0 KB       0 rows
. . exported "SYS"."TSDP_SOURCE$"                            0 KB       0 rows
. . exported "SYSTEM"."REDO_LOG"                             0 KB       0 rows
. . exported "WMSYS"."WM$BATCH_COMPRESSIBLE_TABLES$"         0 KB       0 rows
. . exported "WMSYS"."WM$CONSTRAINTS_TABLE$"                 0 KB       0 rows
. . exported "WMSYS"."WM$CONS_COLUMNS$"                      0 KB       0 rows
. . exported "WMSYS"."WM$LOCKROWS_INFO$"                     0 KB       0 rows
. . exported "WMSYS"."WM$MODIFIED_TABLES$"                   0 KB       0 rows
. . exported "WMSYS"."WM$MP_GRAPH_WORKSPACES_TABLE$"         0 KB       0 rows
. . exported "WMSYS"."WM$MP_PARENT_WORKSPACES_TABLE$"        0 KB       0 rows
. . exported "WMSYS"."WM$NESTED_COLUMNS_TABLE$"              0 KB       0 rows
. . exported "WMSYS"."WM$RESOLVE_WORKSPACES_TABLE$"          0 KB       0 rows
. . exported "WMSYS"."WM$RIC_LOCKING_TABLE$"                 0 KB       0 rows
. . exported "WMSYS"."WM$RIC_TABLE$"                         0 KB       0 rows
. . exported "WMSYS"."WM$RIC_TRIGGERS_TABLE$"                0 KB       0 rows
. . exported "WMSYS"."WM$UDTRIG_DISPATCH_PROCS$"             0 KB       0 rows
. . exported "WMSYS"."WM$UDTRIG_INFO$"                       0 KB       0 rows
. . exported "WMSYS"."WM$VERSION_TABLE$"                     0 KB       0 rows
. . exported "WMSYS"."WM$VT_ERRORS_TABLE$"                   0 KB       0 rows
. . exported "WMSYS"."WM$WORKSPACE_SAVEPOINTS_TABLE$"        0 KB       0 rows
. . exported "MDSYS"."RDF_PARAM$"                        6.515 KB       3 rows
. . exported "SYS"."AUDTAB$TBS$FOR_EXPORT"               5.953 KB       2 rows
. . exported "SYS"."DBA_SENSITIVE_DATA"                      0 KB       0 rows
. . exported "SYS"."DBA_TSDP_POLICY_PROTECTION"              0 KB       0 rows
. . exported "SYS"."FGA_LOG$FOR_EXPORT"                      0 KB       0 rows
. . exported "SYS"."NACL$_ACE_EXP"                           0 KB       0 rows
. . exported "SYS"."NACL$_HOST_EXP"                      6.914 KB       1 rows
. . exported "SYS"."NACL$_WALLET_EXP"                        0 KB       0 rows
. . exported "SYS"."SQL$TEXT_DATAPUMP"                       0 KB       0 rows
. . exported "SYS"."SQL$_DATAPUMP"                           0 KB       0 rows
. . exported "SYS"."SQLOBJ$AUXDATA_DATAPUMP"                 0 KB       0 rows
. . exported "SYS"."SQLOBJ$DATA_DATAPUMP"                    0 KB       0 rows
. . exported "SYS"."SQLOBJ$PLAN_DATAPUMP"                    0 KB       0 rows
. . exported "SYS"."SQLOBJ$_DATAPUMP"                        0 KB       0 rows
. . exported "SYSTEM"."SCHEDULER_JOB_ARGS"                   0 KB       0 rows
. . exported "SYSTEM"."SCHEDULER_PROGRAM_ARGS"               0 KB       0 rows
. . exported "WMSYS"."WM$EXP_MAP"                        7.718 KB       3 rows
. . exported "WMSYS"."WM$METADATA_MAP"                       0 KB       0 rows
. . exported "SSB"."LINEORDER"                           1.107 GB 11997996 rows
. . exported "EODA"."BIG_TABLE"                          1.095 GB 10000000 rows
. . exported "EODA"."T1"                                 111.2 MB 1000000 rows
. . exported "EODA"."T2"                                 111.2 MB 1000000 rows
. . exported "SSB"."PART"                                85.89 MB 1000000 rows
. . exported "SH"."SALES_NP"                             29.62 MB  918843 rows
. . exported "SSB"."CUSTOMER"                            25.40 MB  240000 rows
. . exported "SH"."CUSTOMERS"                            10.27 MB   55500 rows
. . exported "OE"."PRODUCT_DESCRIPTIONS"                 2.379 MB    8640 rows
. . exported "SH"."SALES":"SALES_Q4_2001"                2.257 MB   69749 rows
. . exported "SH"."SALES":"SALES_Q3_1999"                2.166 MB   67138 rows
. . exported "SH"."SALES":"SALES_Q3_2001"                2.130 MB   65769 rows
. . exported "SH"."SALES":"SALES_Q2_2001"                2.051 MB   63292 rows
. . exported "SH"."SALES":"SALES_Q1_1999"                2.071 MB   64186 rows
. . exported "SH"."SALES":"SALES_Q1_2001"                1.965 MB   60608 rows
. . exported "SH"."SALES":"SALES_Q4_1999"                2.014 MB   62388 rows
. . exported "SH"."SALES":"SALES_Q1_2000"                2.012 MB   62197 rows
. . exported "SH"."SALES":"SALES_Q3_2000"                1.910 MB   58950 rows
. . exported "SH"."SALES":"SALES_Q4_2000"                1.814 MB   55984 rows
. . exported "SH"."SALES":"SALES_Q2_2000"                1.802 MB   55515 rows
. . exported "SSB"."SUPPLIER"                            1.629 MB   16000 rows
. . exported "SH"."SALES":"SALES_Q2_1999"                1.754 MB   54233 rows
. . exported "SH"."SALES":"SALES_Q3_1998"                1.634 MB   50515 rows
. . exported "SH"."SALES":"SALES_Q4_1998"                1.581 MB   48874 rows
. . exported "SH"."SALES":"SALES_Q1_1998"                1.413 MB   43687 rows
. . exported "SH"."SALES":"SALES_Q2_1998"                1.160 MB   35758 rows
. . exported "SH"."SUPPLEMENTARY_DEMOGRAPHICS"           697.6 KB    4500 rows
. . exported "SH"."TIMES"                                381.7 KB    1826 rows
. . exported "SH"."FWEEK_PSCAT_SALES_MV"                 419.9 KB   11266 rows
. . exported "SSB"."DATE_DIM"                            270.8 KB    2556 rows
. . exported "SH"."COSTS":"COSTS_Q4_2001"                278.5 KB    9011 rows
. . exported "SH"."COSTS":"COSTS_Q3_2001"                234.6 KB    7545 rows
. . exported "SH"."COSTS":"COSTS_Q1_2001"                228.0 KB    7328 rows
. . exported "SH"."COSTS":"COSTS_Q2_2001"                184.7 KB    5882 rows
. . exported "SH"."COSTS":"COSTS_Q1_1999"                183.7 KB    5884 rows
. . exported "SH"."COSTS":"COSTS_Q4_2000"                160.4 KB    5088 rows
. . exported "SH"."COSTS":"COSTS_Q4_1999"                159.2 KB    5060 rows
. . exported "SH"."COSTS":"COSTS_Q3_2000"                151.6 KB    4798 rows
. . exported "SH"."COSTS":"COSTS_Q4_1998"                144.8 KB    4577 rows
. . exported "SH"."COSTS":"COSTS_Q1_1998"                139.6 KB    4411 rows
. . exported "SH"."COSTS":"COSTS_Q3_1999"                137.5 KB    4336 rows
. . exported "SH"."COSTS":"COSTS_Q2_1999"                132.7 KB    4179 rows
. . exported "SH"."COSTS":"COSTS_Q3_1998"                131.3 KB    4129 rows
. . exported "SH"."COSTS":"COSTS_Q2_2000"                119.1 KB    3715 rows
. . exported "SH"."COSTS":"COSTS_Q1_2000"                120.7 KB    3772 rows
. . exported "OE"."PRODUCT_INFORMATION"                  73.05 KB     288 rows
. . exported "SH"."COSTS":"COSTS_Q2_1998"                79.68 KB    2397 rows
. . exported "OE"."CUSTOMERS"                            81.17 KB     319 rows
. . exported "SH"."PROMOTIONS"                           59.17 KB     503 rows
ORA-39181: Only partial table data may be exported due to fine grain access control on "OE"."PURCHASEORDER"

. . exported "OE"."PURCHASEORDER"                        247.7 KB     132 rows
. . exported "SH"."PRODUCTS"                             26.71 KB      72 rows
. . exported "PM"."PRINT_MEDIA"                          190.6 KB       4 rows
. . exported "OE"."ORDER_ITEMS"                          21.01 KB     665 rows
. . exported "OE"."INVENTORIES"                          21.76 KB    1112 rows
. . exported "HR"."EMPLOYEES"                            17.00 KB     106 rows
. . exported "PM"."TEXTDOCS_NESTEDTAB"                   87.85 KB      12 rows
. . exported "OE"."ORDERS"                               12.59 KB     105 rows
. . exported "OE"."PRODUCT_REF_LIST_NESTEDTAB"           12.57 KB     288 rows
. . exported "IX"."AQ$_STREAMS_QUEUE_TABLE_S"            11.57 KB       1 rows
. . exported "IX"."AQ$_ORDERS_QUEUETABLE_S"              11.29 KB       4 rows
. . exported "SH"."COUNTRIES"                            10.46 KB      23 rows
. . exported "HR"."LOCATIONS"                            8.437 KB      23 rows
. . exported "OE"."CATEGORIES_TAB"                       14.43 KB      22 rows
. . exported "OE"."WAREHOUSES"                           12.76 KB       9 rows
. . exported "SH"."CHANNELS"                             7.414 KB       5 rows
. . exported "HR"."JOB_HISTORY"                          7.195 KB      10 rows
. . exported "HR"."JOBS"                                 7.109 KB      19 rows
. . exported "HR"."DEPARTMENTS"                          7.125 KB      27 rows
. . exported "HR"."COUNTRIES"                            6.367 KB      25 rows
. . exported "SH"."CAL_MONTH_SALES_MV"                   6.382 KB      48 rows
. . exported "HR"."REGIONS"                              5.546 KB       4 rows
. . exported "OE"."PROMOTIONS"                           5.570 KB       2 rows
. . exported "OE"."SUBCATEGORY_REF_LIST_NESTEDTAB"       6.656 KB      21 rows
. . exported "HR"."ORDERS"                                   0 KB       0 rows
. . exported "IX"."AQ$_ORDERS_QUEUETABLE_G"                  0 KB       0 rows
. . exported "IX"."AQ$_ORDERS_QUEUETABLE_H"                  0 KB       0 rows
. . exported "IX"."AQ$_ORDERS_QUEUETABLE_I"                  0 KB       0 rows
. . exported "IX"."AQ$_ORDERS_QUEUETABLE_L"                  0 KB       0 rows
. . exported "IX"."AQ$_ORDERS_QUEUETABLE_T"                  0 KB       0 rows
. . exported "IX"."AQ$_STREAMS_QUEUE_TABLE_C"                0 KB       0 rows
. . exported "IX"."AQ$_STREAMS_QUEUE_TABLE_G"                0 KB       0 rows
. . exported "IX"."AQ$_STREAMS_QUEUE_TABLE_H"                0 KB       0 rows
. . exported "IX"."AQ$_STREAMS_QUEUE_TABLE_I"                0 KB       0 rows
. . exported "IX"."AQ$_STREAMS_QUEUE_TABLE_L"                0 KB       0 rows
. . exported "IX"."AQ$_STREAMS_QUEUE_TABLE_T"                0 KB       0 rows
. . exported "IX"."ORDERS_QUEUETABLE"                        0 KB       0 rows
. . exported "IX"."STREAMS_QUEUE_TABLE"                      0 KB       0 rows
. . exported "SH"."COSTS":"COSTS_1995"                       0 KB       0 rows
. . exported "SH"."COSTS":"COSTS_1996"                       0 KB       0 rows
. . exported "SH"."COSTS":"COSTS_H1_1997"                    0 KB       0 rows
. . exported "SH"."COSTS":"COSTS_H2_1997"                    0 KB       0 rows
. . exported "SH"."COSTS":"COSTS_Q1_2002"                    0 KB       0 rows
. . exported "SH"."COSTS":"COSTS_Q1_2003"                    0 KB       0 rows
. . exported "SH"."COSTS":"COSTS_Q2_2002"                    0 KB       0 rows
. . exported "SH"."COSTS":"COSTS_Q2_2003"                    0 KB       0 rows
. . exported "SH"."COSTS":"COSTS_Q3_2002"                    0 KB       0 rows
. . exported "SH"."COSTS":"COSTS_Q3_2003"                    0 KB       0 rows
. . exported "SH"."COSTS":"COSTS_Q4_2002"                    0 KB       0 rows
. . exported "SH"."COSTS":"COSTS_Q4_2003"                    0 KB       0 rows
. . exported "SH"."RONLY"                                    0 KB       0 rows
. . exported "SH"."SALES":"SALES_1995"                       0 KB       0 rows
. . exported "SH"."SALES":"SALES_1996"                       0 KB       0 rows
. . exported "SH"."SALES":"SALES_H1_1997"                    0 KB       0 rows
. . exported "SH"."SALES":"SALES_H2_1997"                    0 KB       0 rows
. . exported "SH"."SALES":"SALES_Q1_2002"                    0 KB       0 rows
. . exported "SH"."SALES":"SALES_Q1_2003"                    0 KB       0 rows
. . exported "SH"."SALES":"SALES_Q2_2002"                    0 KB       0 rows
. . exported "SH"."SALES":"SALES_Q2_2003"                    0 KB       0 rows
. . exported "SH"."SALES":"SALES_Q3_2002"                    0 KB       0 rows
. . exported "SH"."SALES":"SALES_Q3_2003"                    0 KB       0 rows
. . exported "SH"."SALES":"SALES_Q4_2002"                    0 KB       0 rows
. . exported "SH"."SALES":"SALES_Q4_2003"                    0 KB       0 rows
Master table "SYSTEM"."SYS_EXPORT_FULL_01" successfully loaded/unloaded
******************************************************************************
Dump file set for SYSTEM.SYS_EXPORT_FULL_01 is:
  /opt/oracle/admin/ORCLCDB/dpdump/3D77A45F182E529EE0630101007FC189/expdat.dmp
Job "SYSTEM"."SYS_EXPORT_FULL_01" completed with 1 error(s) at Thu Jul 9 11:19:08 2026 elapsed 0 00:07:18


real    7m25.888s
user    0m0.069s
sys     0m0.050s

文件大小为2.7G:

$ ls -sh /opt/oracle/admin/ORCLCDB/dpdump/3D77A45F182E529EE0630101007FC189/expdat.dmp
2.7G /opt/oracle/admin/ORCLCDB/dpdump/3D77A45F182E529EE0630101007FC189/expdat.dmp

FILESIZE

The Oracle Data Pump Export command-line utility FILESIZE parameter specifies the maximum size of each dump file.

其实就是分割文件,其实并行导出也是会分割文件的,也许FILESIZE更可控吧。

$ time expdp system@orclpdb1 full=y directory=data_pump_dir dumpfile=sampleschema_%U.dmp filesize=1GB
...
Starting "SYSTEM"."SYS_EXPORT_FULL_01":  system/********@orclpdb1 full=y directory=data_pump_dir dumpfile=sampleschema_%U.dmp filesize=1GB
...
Master table "SYSTEM"."SYS_EXPORT_FULL_01" successfully loaded/unloaded
******************************************************************************
Dump file set for SYSTEM.SYS_EXPORT_FULL_01 is:
  /opt/oracle/admin/ORCLCDB/dpdump/3D77A45F182E529EE0630101007FC189/sampleschema_01.dmp
  /opt/oracle/admin/ORCLCDB/dpdump/3D77A45F182E529EE0630101007FC189/sampleschema_02.dmp
  /opt/oracle/admin/ORCLCDB/dpdump/3D77A45F182E529EE0630101007FC189/sampleschema_03.dmp
Job "SYSTEM"."SYS_EXPORT_FULL_01" completed with 1 error(s) at Thu Jul 9 12:02:21 2026 elapsed 0 00:07:21


real    7m28.677s
user    0m0.074s
sys     0m0.047s

$ ls -1sh *.dmp
1.1G sampleschema_01.dmp
1.1G sampleschema_02.dmp
628M sampleschema_03.dmp

KEEP_MASTER

The Oracle Data Pump Export command-line utility KEEP_MASTER parameter indicates whether the Data Pump control job table should be deleted or retained at the end of an Oracle Data Pump job that completes successfully.

示例:

$ expdp hr@orclpdb1 tables=employees directory=data_pump_dir keep_master=yes
...
Starting "HR"."SYS_EXPORT_TABLE_01":  hr/********@orclpdb1 tables=employees directory=data_pump_dir keep_master=yes
Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
...
Processing object type TABLE_EXPORT/TABLE/TRIGGER
. . exported "HR"."EMPLOYEES"                            17.00 KB     106 rows
Master table "HR"."SYS_EXPORT_TABLE_01" successfully loaded/unloaded
******************************************************************************
Dump file set for HR.SYS_EXPORT_TABLE_01 is:
  /opt/oracle/admin/ORCLCDB/dpdump/3D77A45F182E529EE0630101007FC189/expdat.dmp
Job "HR"."SYS_EXPORT_TABLE_01" successfully completed at Thu Jul 9 14:05:34 2026 elapsed 0 00:00:39

注意以上日志中的Master table "HR"."SYS_EXPORT_TABLE_01" successfully loaded/unloaded

默认情况下,正常完成的data pump任务会将master table 删除。

The Data Pump control job table is automatically retained for jobs that do not complete successfully.

你只有在data pump任务没有成功完成或主动指定保留时才会看到master table:

SQL> desc "HR"."SYS_EXPORT_TABLE_01"
 Name                                      Null?    Type
 ----------------------------------------- -------- ----------------------------
 ABORT_STEP                                         NUMBER
 ACCESS_METHOD                                      VARCHAR2(16)
...

你也可以直接删除此表:

SQL> drop table "HR"."SYS_EXPORT_TABLE_01"  purge;

Table dropped.

LOGTIME

The Oracle Data Pump Export command-line utility LOGTIME parameter specifies that messages displayed during export operations are timestamped.

这是一个impdp和expdp都支持的选项,会在日志中记录时间。其实这理应是一个默认选项。

示例:

$ expdp hr@orclpdb1 tables=employees directory=data_pump_dir logtime=all

Export: Release 19.0.0.0.0 - Production on Thu Jul 9 14:13:58 2026
Version 19.3.0.0.0

Copyright (c) 1982, 2019, Oracle and/or its affiliates.  All rights reserved.
Password:

Connected to: Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
09-JUL-26 14:14:03.547: Starting "HR"."SYS_EXPORT_TABLE_01":  hr/********@orclpdb1 tables=employees directory=data_pump_dir logtime=all
09-JUL-26 14:14:08.140: Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
09-JUL-26 14:14:08.345: Processing object type TABLE_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
09-JUL-26 14:14:08.619: Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
09-JUL-26 14:14:19.913: Processing object type TABLE_EXPORT/TABLE/STATISTICS/MARKER
09-JUL-26 14:14:24.045: Processing object type TABLE_EXPORT/TABLE/TABLE
09-JUL-26 14:14:26.067: Processing object type TABLE_EXPORT/TABLE/GRANT/OWNER_GRANT/OBJECT_GRANT
09-JUL-26 14:14:26.543: Processing object type TABLE_EXPORT/TABLE/COMMENT
09-JUL-26 14:14:28.108: Processing object type TABLE_EXPORT/TABLE/INDEX/INDEX
09-JUL-26 14:14:31.112: Processing object type TABLE_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
09-JUL-26 14:14:31.622: Processing object type TABLE_EXPORT/TABLE/CONSTRAINT/REF_CONSTRAINT
09-JUL-26 14:14:31.938: Processing object type TABLE_EXPORT/TABLE/TRIGGER
09-JUL-26 14:14:32.476: . . exported "HR"."EMPLOYEES"                            17.00 KB     106 rows
09-JUL-26 14:14:33.653: Master table "HR"."SYS_EXPORT_TABLE_01" successfully loaded/unloaded
09-JUL-26 14:14:33.656: ******************************************************************************
09-JUL-26 14:14:33.657: Dump file set for HR.SYS_EXPORT_TABLE_01 is:
09-JUL-26 14:14:33.660:   /opt/oracle/admin/ORCLCDB/dpdump/3D77A45F182E529EE0630101007FC189/expdat.dmp
09-JUL-26 14:14:33.668: Job "HR"."SYS_EXPORT_TABLE_01" successfully completed at Thu Jul 9 14:14:33 2026 elapsed 0 00:00:33

METRICS

The Oracle Data Pump Export command-line utility METRICS parameter indicates whether you want additional information about the job reported to the Data Pump log file.
When METRICS=YES is used, the number of objects and the elapsed time are recorded in the Data Pump log file.

示例:

$ expdp hr@orclpdb1 tables=employees directory=data_pump_dir metrics=yes      
Export: Release 19.0.0.0.0 - Production on Thu Jul 9 14:16:42 2026
Version 19.3.0.0.0

Copyright (c) 1982, 2019, Oracle and/or its affiliates.  All rights reserved.
Password:

Connected to: Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Starting "HR"."SYS_EXPORT_TABLE_01":  hr/********@orclpdb1 tables=employees directory=data_pump_dir metrics=yes
W-1 Startup took 0 seconds
W-1 Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
W-1 Processing object type TABLE_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
W-1      Completed 6 INDEX_STATISTICS objects in 1 seconds
W-1 Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
W-1      Completed 1 TABLE_STATISTICS objects in 0 seconds
W-1 Processing object type TABLE_EXPORT/TABLE/STATISTICS/MARKER
W-1      Completed 1 MARKER objects in 10 seconds
W-1 Processing object type TABLE_EXPORT/TABLE/TABLE
W-1      Completed 1 TABLE objects in 3 seconds
W-1 Processing object type TABLE_EXPORT/TABLE/GRANT/OWNER_GRANT/OBJECT_GRANT
W-1      Completed 2 OBJECT_GRANT objects in 1 seconds
W-1 Processing object type TABLE_EXPORT/TABLE/COMMENT
W-1      Completed 12 COMMENT objects in 1 seconds
W-1 Processing object type TABLE_EXPORT/TABLE/INDEX/INDEX
W-1      Completed 5 INDEX objects in 1 seconds
W-1 Processing object type TABLE_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
W-1      Completed 3 CONSTRAINT objects in 3 seconds
W-1 Processing object type TABLE_EXPORT/TABLE/CONSTRAINT/REF_CONSTRAINT
W-1      Completed 3 REF_CONSTRAINT objects in 1 seconds
W-1 Processing object type TABLE_EXPORT/TABLE/TRIGGER
W-1      Completed 2 TRIGGER objects in 0 seconds
W-1 . . exported "HR"."EMPLOYEES"                            17.00 KB     106 rows in 0 seconds using direct_path
W-1      Completed 1 TABLE_EXPORT/TABLE/TABLE_DATA objects in 0 seconds
W-1 Master table "HR"."SYS_EXPORT_TABLE_01" successfully loaded/unloaded
******************************************************************************
Dump file set for HR.SYS_EXPORT_TABLE_01 is:
  /opt/oracle/admin/ORCLCDB/dpdump/3D77A45F182E529EE0630101007FC189/expdat.dmp
Job "HR"."SYS_EXPORT_TABLE_01" successfully completed at Thu Jul 9 14:17:16 2026 elapsed 0 00:00:31

NOLOGFILE

Specifies whether to suppress creation of a log file. Default: NO

示例:

$ expdp hr@orclpdb1 tables=employees directory=data_pump_dir nologfile=yes
$ ls export.log
ls: cannot access export.log: No such file or directory

PARALLEL

Specifies the maximum number of processes of active execution operating on behalf of the export job. This execution set consists of a combination of worker processes and parallel input/output (I/O) server processes. The Data Pump control process and worker processes acting as query coordinators in parallel query operations do not count toward this total.
This parameter enables you to make trade-offs between resource consumption and elapsed time.

PARALLEL的默认值为1。

示例:

$ time expdp hr@orclpdb1 directory=data_pump_dir
real    1m49.520s
user    0m0.033s
sys     0m0.015s
$ ls -sh1 *.dmp
728K expdat.dmp

$ time expdp hr@orclpdb1 directory=data_pump_dir parallel=2
real    1m31.012s
user    0m0.036s
sys     0m0.024s
$ ls -sh1 *.dmp
728K expdat.dmp

$ time expdp hr@orclpdb1 directory=data_pump_dir dumpfile=hr_schema_%U.dmp parallel=2
real    1m31.075s
user    0m0.025s
sys     0m0.020s
$ ls -sh1 *.dmp
720K hr_schema_01.dmp
 12K hr_schema_02.dmp

REUSE_DUMPFILES

Specifies whether to overwrite a preexisting dump file.

PARFILE

Specifies the name of an export parameter file, also known as a parfile.There is no default.

推荐使用parfile,可以避免命令行中复杂的转义。

以下命令:

$ expdp hr@orclpdb1 tables=employees directory=data_pump_dir dumpfile=employees.dmp include=INDEX:\"IN \(\'EMP_NAME_IX\'\)\"

对应的parfile为:

DIRECTORY=data_pump_dir
DUMPFILE=employees.dmp
TABLES=employees
INCLUDE=INDEX:"IN ('EMP_NAME_IX')"

执行如下:

$ expdp hr@orclpdb1 parfile=expdp.par

REMAP_DATA

The Oracle Data Pump Export command-line utility REMAP_DATA parameter enables you to specify a remap function that takes as a source the original value of the designated column and returns a remapped value that replaces the original value in the dump file.

通常用于将数据变换以导入测试系统。

先创建测试用函数:

SQL>
CREATE OR REPLACE PACKAGE remap IS
    FUNCTION minus10(p_input NUMBER) RETURN NUMBER;
END remap;
/

Package created.

SQL>
CREATE OR REPLACE PACKAGE BODY remap IS
    FUNCTION minus10(p_input NUMBER) RETURN NUMBER IS
    BEGIN
        IF p_input IS NULL THEN
            RETURN NULL;
        END IF;

        RETURN p_input - 10;
    END minus10;
END remap;
/

Package body created.

SQL> SELECT remap.minus10(100) FROM DUAL;

REMAP.MINUS10(100)
------------------
                90

SQL> SELECT remap.minus10(NULL) FROM DUAL;

REMAP.MINUS10(NULL)
-------------------


执行如下:

$ expdp hr@orclpdb1 tables=employees directory=data_pump_dir REMAP_DATA=hr.employees.salary:hr.remap.minus10
Connected to: Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Starting "HR"."SYS_EXPORT_TABLE_01":  hr/********@orclpdb1 tables=employees directory=data_pump_dir REMAP_DATA=hr.employees.salary:hr.remap.minus10
Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
Processing object type TABLE_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
Processing object type TABLE_EXPORT/TABLE/STATISTICS/MARKER
Processing object type TABLE_EXPORT/TABLE/TABLE
Processing object type TABLE_EXPORT/TABLE/GRANT/OWNER_GRANT/OBJECT_GRANT
Processing object type TABLE_EXPORT/TABLE/COMMENT
Processing object type TABLE_EXPORT/TABLE/INDEX/INDEX
Processing object type TABLE_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
Processing object type TABLE_EXPORT/TABLE/CONSTRAINT/REF_CONSTRAINT
Processing object type TABLE_EXPORT/TABLE/TRIGGER
. . exported "HR"."EMPLOYEES"                            17.10 KB     106 rows
Master table "HR"."SYS_EXPORT_TABLE_01" successfully loaded/unloaded
******************************************************************************
Dump file set for HR.SYS_EXPORT_TABLE_01 is:
  /opt/oracle/admin/ORCLCDB/dpdump/3D77A45F182E529EE0630101007FC189/expdat.dmp
Job "HR"."SYS_EXPORT_TABLE_01" successfully completed at Thu Jul 9 15:59:58 2026 elapsed 0 00:00:35

导入到另一sh schema进行验证:

$ impdp system@orclpdb1 remap_schema=hr:sh directory=data_pump_dir dumpfile=expdat.dmp

Import: Release 19.0.0.0.0 - Production on Thu Jul 9 16:00:46 2026
Version 19.3.0.0.0

Copyright (c) 1982, 2019, Oracle and/or its affiliates.  All rights reserved.
Password:

UDI-28002: operation generated ORACLE error 28002
ORA-28002: the password will expire within 7 days

Connected to: Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Master table "SYSTEM"."SYS_IMPORT_FULL_01" successfully loaded/unloaded
Starting "SYSTEM"."SYS_IMPORT_FULL_01":  system/********@orclpdb1 remap_schema=hr:sh directory=data_pump_dir dumpfile=expdat.dmp
Processing object type TABLE_EXPORT/TABLE/TABLE
Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
. . imported "SH"."EMPLOYEES"                            17.10 KB     106 rows
Processing object type TABLE_EXPORT/TABLE/GRANT/OWNER_GRANT/OBJECT_GRANT
Processing object type TABLE_EXPORT/TABLE/COMMENT
Processing object type TABLE_EXPORT/TABLE/INDEX/INDEX
Processing object type TABLE_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
Processing object type TABLE_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
Processing object type TABLE_EXPORT/TABLE/CONSTRAINT/REF_CONSTRAINT
ORA-39083: Object type REF_CONSTRAINT:"SH"."EMP_DEPT_FK" failed to create with error:
ORA-00942: table or view does not exist

Failing sql is:
ALTER TABLE "SH"."EMPLOYEES" ADD CONSTRAINT "EMP_DEPT_FK" FOREIGN KEY ("DEPARTMENT_ID") REFERENCES "SH"."DEPARTMENTS" ("DEPARTMENT_ID") ENABLE

ORA-39083: Object type REF_CONSTRAINT:"SH"."EMP_JOB_FK" failed to create with error:
ORA-00942: table or view does not exist

Failing sql is:
ALTER TABLE "SH"."EMPLOYEES" ADD CONSTRAINT "EMP_JOB_FK" FOREIGN KEY ("JOB_ID") REFERENCES "SH"."JOBS" ("JOB_ID") ENABLE

Processing object type TABLE_EXPORT/TABLE/TRIGGER
Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
Processing object type TABLE_EXPORT/TABLE/STATISTICS/MARKER
ORA-39082: Object type TRIGGER:"SH"."SECURE_EMPLOYEES" created with compilation warnings

ORA-39082: Object type TRIGGER:"SH"."UPDATE_JOB_HISTORY" created with compilation warnings

Job "SYSTEM"."SYS_IMPORT_FULL_01" completed with 4 error(s) at Thu Jul 9 16:01:25 2026 elapsed 0 00:00:36

验证:

SQL> select salary from hr.employees where employee_id = 101;

    SALARY
----------
     17000

SQL> select salary from sh.employees where employee_id = 101;

    SALARY
----------
     16990

SQL> show user
USER is "SYS"

SQL> drop table sh.employees purge;

Table dropped.

SAMPLE

Specifies a percentage of the data rows that you want to be sampled and unloaded from the source database.

示例:

$ expdp hr@orclpdb1 tables=employees directory=data_pump_dir sample=60
...
. . exported "HR"."EMPLOYEES"                            17.00 KB     57 rows
...

而employees表有107行:

SQL> select count(*) from employees;

  COUNT(*)
----------
       106
SQL> select count(*)*.6 from employees;

COUNT(*)*.6
-----------
       63.6

57并非106的60%。

The sample_percent indicates the probability that a row will be selected as part of the sample. It does not mean that the database will retrieve exactly that amount of rows from the table. The value you supply for sample_percent can be anywhere from .000001 up to, but not including, 100.

也就是说,每行被选择的概率为60%。对于106行这样的小样本量,几十行的偏差是完全正常的;当数据量达到百万级别时,这个比例会非常接近60%。

SCHEMAS

Specifies that you want to perform a schema-mode export. This is the default mode for Export.
Default: The current user’s schema

对于普通的用户,在schema mode export时,只会导出schema object。

Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
Processing object type SCHEMA_EXPORT/PACKAGE/PACKAGE_BODY
Processing object type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
Processing object type SCHEMA_EXPORT/STATISTICS/MARKER
Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
Processing object type SCHEMA_EXPORT/SEQUENCE/SEQUENCE
Processing object type SCHEMA_EXPORT/TABLE/TABLE
Processing object type SCHEMA_EXPORT/TABLE/GRANT/OWNER_GRANT/OBJECT_GRANT
Processing object type SCHEMA_EXPORT/TABLE/COMMENT
Processing object type SCHEMA_EXPORT/PACKAGE/PACKAGE_SPEC
Processing object type SCHEMA_EXPORT/FUNCTION/FUNCTION
Processing object type SCHEMA_EXPORT/PROCEDURE/PROCEDURE
Processing object type SCHEMA_EXPORT/PACKAGE/COMPILE_PACKAGE/PACKAGE_SPEC/ALTER_PACKAGE_SPEC
Processing object type SCHEMA_EXPORT/FUNCTION/ALTER_FUNCTION
Processing object type SCHEMA_EXPORT/PROCEDURE/ALTER_PROCEDURE
Processing object type SCHEMA_EXPORT/VIEW/VIEW
Processing object type SCHEMA_EXPORT/TABLE/INDEX/INDEX
Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/REF_CONSTRAINT
Processing object type SCHEMA_EXPORT/TABLE/TRIGGER

但若此用户被赋予DATAPUMP_EXP_FULL_DATABASE 角色,则还会额外导出以下对象:

Processing object type SCHEMA_EXPORT/USER
Processing object type SCHEMA_EXPORT/SYSTEM_GRANT
Processing object type SCHEMA_EXPORT/ROLE_GRANT
Processing object type SCHEMA_EXPORT/DEFAULT_ROLE
Processing object type SCHEMA_EXPORT/TABLESPACE_QUOTA

所以最佳建议是:

  • 不要赋予普通用户DATAPUMP_EXP_FULL_DATABASE角色
  • SCHEMAS选项只应SYSTEM用户或专门用于导出的用户使用

TABLES

Specifies that you want to perform a table-mode export.

导出多表的示例:

$ expdp hr@orclpdb1 tables=employees,jobs directory=data_pump_dir

VIEWS_AS_TABLES

Specifies that you want one or more views exported as tables.

使用sample schema中的视图:

SQL> select count(*) from hr.emp_details_view;

  COUNT(*)
----------
       105

示例:

$ expdp hr@orclpdb1 views_as_tables=EMP_DETAILS_VIEW directory=data_pump_dir  
Export: Release 19.0.0.0.0 - Production on Thu Jul 9 15:22:15 2026
Version 19.3.0.0.0

Copyright (c) 1982, 2019, Oracle and/or its affiliates.  All rights reserved.
Password:

Connected to: Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Starting "HR"."SYS_EXPORT_TABLE_01":  hr/********@orclpdb1 views_as_tables=EMP_DETAILS_VIEW directory=data_pump_dir
Processing object type TABLE_EXPORT/VIEWS_AS_TABLES/TABLE_DATA
Processing object type TABLE_EXPORT/VIEWS_AS_TABLES/TABLE
. . exported "HR"."EMP_DETAILS_VIEW"                     24.45 KB     105 rows
Master table "HR"."SYS_EXPORT_TABLE_01" successfully loaded/unloaded
******************************************************************************
Dump file set for HR.SYS_EXPORT_TABLE_01 is:
  /opt/oracle/admin/ORCLCDB/dpdump/3D77A45F182E529EE0630101007FC189/expdat.dmp
Job "HR"."SYS_EXPORT_TABLE_01" successfully completed at Thu Jul 9 15:22:31 2026 elapsed 0 00:00:13

ABORT_STEP

Used to stop the job after it is initialized. Stopping a job after it is initialized enables you to query the Data Pump control job table that you want to query before any data is exported.

不知道具体有何用,也许可以用于演示和调试吧。

$ expdp hr@orclpdb1 directory=data_pump_dir abort_step=-1

Export: Release 19.0.0.0.0 - Production on Thu Jul 9 15:26:10 2026
Version 19.3.0.0.0

Copyright (c) 1982, 2019, Oracle and/or its affiliates.  All rights reserved.
Password:

Connected to: Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Job "HR"."SYS_EXPORT_SCHEMA_01" stopped by user request at Thu Jul 9 15:26:18 2026 elapsed 0 00:00:06

ATTACH

Attaches the worker session to an existing Data Pump control export job, and automatically places you in the interactive-command interface. Export displays a description of the job to which you are attached, and also displays the Export prompt.
The default is the job currently in the user schema, if there is only one.

利用上一个示例中abort的任务,我们可以attach他用于诊断。

$ expdp hr@orclpdb1 attach=SYS_EXPORT_SCHEMA_01

Export: Release 19.0.0.0.0 - Production on Thu Jul 9 15:32:03 2026
Version 19.3.0.0.0

Copyright (c) 1982, 2019, Oracle and/or its affiliates.  All rights reserved.
Password:

Connected to: Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production

Job: SYS_EXPORT_SCHEMA_01
  Owner: HR
  Operation: EXPORT
  Creator Privs: FALSE
  GUID: 562989DF71146392E0630101007F4041
  Start Time: Thursday, 09 July, 2026 15:32:08
  Mode: SCHEMA
  Instance: ORCLCDB
  Max Parallelism: 1
  Timezone: +00:00
  Timezone version: 32
  Endianness: LITTLE
  NLS character set: AL32UTF8
  NLS NCHAR character set: AL16UTF16
  EXPORT Job Parameters:
  Parameter Name      Parameter Value:
     CLIENT_COMMAND        hr/********@orclpdb1 directory=data_pump_dir abort_step=-1
     TRACE                 0
  State: IDLING
  Bytes Processed: 0
  Current Parallelism: 1
  Job Error Count: 0
  Job heartbeat: 0
  Dump File: /opt/oracle/admin/ORCLCDB/dpdump/3D77A45F182E529EE0630101007FC189/expdat.dmp
    bytes written: 4,096

如果你当时并没有记录任务的名称,也可以在数据库中查到:

SELECT owner_name, 
       job_name, 
       TRIM(operation) AS operation, 
       TRIM(job_mode) AS job_mode, 
       state
FROM   dba_datapump_jobs
ORDER BY 1, 2;

OWNER_NAME	JOB_NAME	OPERATION	JOB_MODE	STATE
HR	SYS_EXPORT_SCHEMA_01	EXPORT	SCHEMA	NOT RUNNING

查询状态:

Export> status

Job: SYS_EXPORT_SCHEMA_01
  Operation: EXPORT
  Mode: SCHEMA
  State: IDLING
  Bytes Processed: 0
  Current Parallelism: 1
  Job Error Count: 0
  Job heartbeat: 2
  Dump File: /opt/oracle/admin/ORCLCDB/dpdump/3D77A45F182E529EE0630101007FC189/expdat.dmp
    bytes written: 4,096

接下来你可以选择KILL_JOB, STOP_JOB或者START_JOB。

Export> start_job

Export> status

Job: SYS_EXPORT_SCHEMA_01
  Operation: EXPORT
  Mode: SCHEMA
  State: EXECUTING
  Bytes Processed: 0
  Current Parallelism: 1
  Job Error Count: 0
  Job heartbeat: 2
  Dump File: /opt/oracle/admin/ORCLCDB/dpdump/3D77A45F182E529EE0630101007FC189/expdat.dmp
    bytes written: 4,096

Worker 1 Status:
  Instance ID: 1
  Instance name: ORCLCDB
  Host name: oracle-19c-vagrant
  Object start time: Wednesday, 00 Sat, 0000 0:00:00
  Object status at: Thursday, 09 July, 2026 15:35:0
  Process Name: DW00
  State: EXECUTING

Export> status

Job: SYS_EXPORT_SCHEMA_01
  Operation: EXPORT
  Mode: SCHEMA
  State: EXECUTING
  Bytes Processed: 0
  Current Parallelism: 1
  Job Error Count: 0
  Job heartbeat: 10
  Dump File: /opt/oracle/admin/ORCLCDB/dpdump/3D77A45F182E529EE0630101007FC189/expdat.dmp
    bytes written: 40,960

Worker 1 Status:
  Instance ID: 1
  Instance name: ORCLCDB
  Host name: oracle-19c-vagrant
  Object start time: Thursday, 09 July, 2026 15:36:13
  Object status at: Thursday, 09 July, 2026 15:36:14
  Process Name: DW00
  State: EXECUTING

Export> status

Job: SYS_EXPORT_SCHEMA_01
  Operation: EXPORT
  Mode: SCHEMA
  State: COMPLETING
  Bytes Processed: 60,201
  Percent Done: 100
  Current Parallelism: 1
  Job Error Count: 0
  Job heartbeat: 1
  Dump File: /opt/oracle/admin/ORCLCDB/dpdump/3D77A45F182E529EE0630101007FC189/expdat.dmp
    bytes written: 208,896

Worker 1 Status:
  Instance ID: 1
  Instance name: ORCLCDB
  Host name: oracle-19c-vagrant
  Access method: direct_path
  Object start time: Thursday, 09 July, 2026 15:37:39
  Object status at: Thursday, 09 July, 2026 15:37:41
  Process Name: DW00
  State: WORK WAITING

[oracle@oracle-19c-vagrant expdp]$

最后一个status查询时,由于任务已经完成,则自动退出到命令行模式下了。

CONTENT

Enables you to filter what Export unloads: data only, metadata only, or both.

CONTENT并不能诊断特定的表。如果你的需求为:

  • 将schema中所有的对象导出
  • 其中某一个对象不需要导出数据

那么你需要两个expdp命令来实现。

参考

Logo

openEuler 是由开放原子开源基金会孵化的全场景开源操作系统项目,面向数字基础设施四大核心场景(服务器、云计算、边缘计算、嵌入式),全面支持 ARM、x86、RISC-V、loongArch、PowerPC、SW-64 等多样性计算架构

更多推荐