适用范围
对大表进行备份但单个目录没有足够的空间来保留转储
使用方法
创建两个目录
SQL> create directory DIR1 as '/home/oracle/DIR1';
Directory created.
SQL> create directory DIR2 as '/home/oracle/DIR2';
Directory created.
SQL> grant all on directory DIR1 to public;
Grant succeeded.
SQL> grant all on directory DIR2 to public;
Grant succeeded.
并行导出
[oracle@localhost ~]$ expdp dumpfile=DIR1:test_%U.dmp,DIR2:test_%U.dmp logfile=test.log directory=DIR1 parallel=2 tables=ljc.test
Export: Release 12.1.0.2.0 - Production on Thu Aug 27 10:56:31 2015
Copyright (c) 1982, 2014, Oracle and/or its affiliates. All rights reserved.
Username: ljc/ljc@orcl
Connected to: Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
Starting "ljc"."SYS_EXPORT_TABLE_01": ljc/********@orcl dumpfile=DIR1:test_%U.dmp,DIR2:test_%U.dmp logfile=test.log directory=DIR1 parallel=2 tables=ljc.test
Estimate in progress using BLOCKS method...
Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
Total estimation using BLOCKS method: 13 MB
. . exported "ljc"."TEST" 10.66 MB 93915 rows
Processing object type TABLE_EXPORT/TABLE/TABLE
Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
Processing object type TABLE_EXPORT/TABLE/STATISTICS/MARKERMaster table "ljc"."SYS_EXPORT_TABLE_01" successfully loaded/unloaded
******************************************************************************
Dump file set for ljc.SYS_EXPORT_TABLE_01 is:
/home/oracle/DIR1/test_01.dmp
/home/oracle/DIR2/test_01.dmpJob "ljc"."SYS_EXPORT_TABLE_01" successfully completed at Sun Feb 18 10:57:09 2024 elapsed 0 00:00:31
并行导入
[oracle@localhost ~]$ impdp dumpfile=DIR1:test_%U.dmp,DIR2:test_%U.dmp logfile=test1.log directory=DIR1 parallel=2 tables=ljc.test table_exists_action=REPLACE
Import: Release 12.1.0.2.0 - Production on Thu Aug 27 11:28:22 2015
Copyright (c) 1982, 2014, Oracle and/or its affiliates. All rights reserved.
Username: ljc/ljc@orcl
Connected to: Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
Master table "ljc"."SYS_IMPORT_TABLE_01" successfully loaded/unloaded
Starting "ljc"."SYS_IMPORT_TABLE_01": ljc/********@orcl dumpfile=DIR1:test_%U.dmp,DIR2:test_%U.dmp logfile=test1.log directory=DIR1 parallel=2 tables=ljc.test table_exists_action=REPLACE
Processing object type TABLE_EXPORT/TABLE/TABLE
Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
. . imported "ljc"."TEST" 10.66 MB 93915 rows
Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
Processing object type TABLE_EXPORT/TABLE/STATISTICS/MARKER
Job "ljc"."SYS_IMPORT_TABLE_01" successfully completed at Sun Feb 18 11:29:05 2024 elapsed 0 00:00:35