本文共 5871 字,大约阅读时间需要 19 分钟。
[20150126]datadump的非文档参数.txt
--总结一下expdp/impdp的非文档参数:
1. METRICS
METRICS=Y ,记录执行详细的执行时间.例子:$ expdp scott/btbtms DIRECTORY=DATA_PUMP_DIR DUMPFILE=emp012601.dmp LOGFILE=emp012601.log tables=emp metrics=y
Export: Release 11.2.0.3.0 - Production on Mon Jan 26 10:03:22 2015 Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options Starting "SCOTT"."SYS_EXPORT_TABLE_01": scott/a* DIRECTORY=DATA_PUMP_DIR DUMPFILE=emp012601.dmp LOGFILE=emp012601.log tables=emp metrics=y Estimate in progress using BLOCKS method... Processing object type TABLE_EXPORT/TABLE/TABLE_DATA Total estimation using BLOCKS method: 64 KB Processing object type TABLE_EXPORT/TABLE/TABLE Completed 1 TABLE objects in 0 seconds Processing object type TABLE_EXPORT/TABLE/GRANT/OWNER_GRANT/OBJECT_GRANT Completed 1 OBJECT_GRANT objects in 2 seconds Processing object type TABLE_EXPORT/TABLE/INDEX/INDEX Completed 3 INDEX objects in 2 seconds Processing object type TABLE_EXPORT/TABLE/CONSTRAINT/CONSTRAINT Completed 1 CONSTRAINT objects in 0 seconds Processing object type TABLE_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS Completed 3 INDEX_STATISTICS objects in 0 seconds Processing object type TABLE_EXPORT/TABLE/CONSTRAINT/REF_CONSTRAINT Completed 1 REF_CONSTRAINT objects in 1 seconds Processing object type TABLE_EXPORT/TABLE/INDEX/BITMAP_INDEX/INDEX Completed 1 INDEX objects in 0 seconds Processing object type TABLE_EXPORT/TABLE/INDEX/STATISTICS/BITMAP_INDEX/INDEX_STATISTICS Completed 1 INDEX_STATISTICS objects in 0 seconds Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS Completed 1 TABLE_STATISTICS objects in 0 seconds Processing object type TABLE_EXPORT/TABLE/STATISTICS/USER_PREF_STATISTICS Completed 1 USER_PREF_STATISTICS objects in 1 seconds . . exported "SCOTT"."EMP" 8.976 KB 14 rows Master table "SCOTT"."SYS_EXPORT_TABLE_01" successfully loaded/unloaded ****************************************************************************** Dump file set for SCOTT.SYS_EXPORT_TABLE_01 is: /u01/app/oracle11g/admin/test/dpdump/emp012601.dmp Job "SCOTT"."SYS_EXPORT_TABLE_01" successfully completed at 10:03:362.ACCESS_METHOD
--这个参数缺省无需指定,oracle会选择合适最佳的加载与卸载方式.
--有兴趣可以看看我以前写的expdp与行迁移.--可以使用access_method=external_table加快存在行迁移的表导出.
3. TRACE
--使用7位的十六进制数表示.前3位表示特定的DataPump component,后4位通常都是0300,前面的0可以省略.大小写不敏感.输出信息在相 --应的跟踪文件,而不是导出的日志文件.10300 SHDW: To trace the Shadow process
20300 KUPV: To trace Fixed table 40300 'div' To trace Process services 80300 KUPM: To trace Master Control Process 100300 KUPF: To trace File Manager 200300 KUPC: To trace Queue services 400300 KUPW: To trace Worker process(es) 800300 KUPD: To trace Data Package 1000300 META: To trace Metadata Package 1FF0300 'all' To trace all components, full tracing--例子:
$ expdp scott/btbtms DIRECTORY=DATA_PUMP_DIR DUMPFILE=emp012601.dmp LOGFILE=emp012601.log tables=emp trace=1FF0300
Export: Release 11.2.0.3.0 - Production on Mon Jan 26 09:13:03 2015
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options Starting "SCOTT"."SYS_EXPORT_TABLE_01": scott/a*** DIRECTORY=DATA_PUMP_DIR DUMPFILE=emp012601.dmp LOGFILE=emp012601.log tables=emp trace=1FF0300 Estimate in progress using BLOCKS method... Processing object type TABLE_EXPORT/TABLE/TABLE_DATA Total estimation using BLOCKS method: 64 KB Processing object type TABLE_EXPORT/TABLE/TABLE Processing object type TABLE_EXPORT/TABLE/GRANT/OWNER_GRANT/OBJECT_GRANT 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 Processing object type TABLE_EXPORT/TABLE/INDEX/BITMAP_INDEX/INDEX Processing object type TABLE_EXPORT/TABLE/INDEX/STATISTICS/BITMAP_INDEX/INDEX_STATISTICS Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS Processing object type TABLE_EXPORT/TABLE/STATISTICS/USER_PREF_STATISTICS . . exported "SCOTT"."EMP" 8.976 KB 14 rows Master table "SCOTT"."SYS_EXPORT_TABLE_01" successfully loaded/unloaded ****************************************************************************** Dump file set for SCOTT.SYS_EXPORT_TABLE_01 is: /u01/app/oracle11g/admin/test/dpdump/emp012601.dmp Job "SCOTT"."SYS_EXPORT_TABLE_01" successfully completed at 09:13:18$ cd /u01/app/oracle11g/diag/rdbms/test/test/trace
$ ls -ltr *.trc | grep "2015-01-26 09:13:" -rw-r----- 1 oracle11g oinstall 1073 2015-01-26 09:13:05 test_dm00_10649.trc -rw-r----- 1 oracle11g oinstall 1033 2015-01-26 09:13:06 test_dw00_10651.trc -rw-r----- 1 oracle11g oinstall 150558 2015-01-26 09:13:18 test_dw00_10651_127_0_0_1.trc -rw-r----- 1 oracle11g oinstall 25430 2015-01-26 09:13:19 test_ora_10647_127_0_0_1.trc -rw-r----- 1 oracle11g oinstall 47714 2015-01-26 09:13:19 test_dm00_10649_127_0_0_1.trc4.KEEP_MASTER
--使用KEEP_MASTER=Y ,可以在完成后不删除master table,也就是SYS_EXPORT_TABLE_*表.
SCOTT@test> desc SYS_EXPORT_TABLE_01 ERROR: ORA-04043: object SYS_EXPORT_TABLE_01 does not exist
$ expdp scott/btbtms DIRECTORY=DATA_PUMP_DIR DUMPFILE=emp012601.dmp LOGFILE=emp012601.log tables=emp KEEP_MASTER=Y
...SCOTT@test> @desc SYS_EXPORT_TABLE_01 Name Null? Type ----------------------------------------- -------- ---------------------------- PROCESS_ORDER NUMBER DUPLICATE NUMBER DUMP_FILEID NUMBER DUMP_POSITION NUMBER DUMP_LENGTH NUMBER DUMP_ORIG_LENGTH NUMBER DUMP_ALLOCATION NUMBER COMPLETED_ROWS NUMBER ERROR_COUNT NUMBER ELAPSED_TIME NUMBER
--可以发现SYS_EXPORT_TABLE_01没有删除.
转载地址:http://cstpx.baihongyu.com/