Oracle Data Pump 导出和导入数据(4)

开始任务后,导数继续执行

select job_name,state from dba_datapump_jobs; JOB_NAME STATE ------------------------------ ------------------------------ EXPORTTB_BYSIZE EXECUTING select job_name,state from dba_datapump_jobs; JOB_NAME STATE ------------------------------ ------------------------------ EXPORTTB_BYSIZE COMPLETING

在添加dump file(add_file)时,添加的文件最终大小取决于添加了多少dump file,在上例中仅添加了一个file05.dmp,so 剩余的数据量将全部归纳到该文件中;如果未添加文件oracle会自己分配和创建一个dump文件;

[oracle@sywu backup]$ ls -ltrh -rw-r-----. 1 oracle asmadmin 10M Jun 2 22:30 file02.dmp -rw-r-----. 1 oracle asmadmin 10M Jun 2 22:30 file03.dmp -rw-r-----. 1 oracle asmadmin 10M Jun 2 22:30 file04.dmp -rw-r-----. 1 oracle asmadmin 10M Jun 2 22:30 size_each_sywu.dump -rw-r-----. 1 oracle asmadmin 36M Jun 2 22:30 file05.dmp -rw-r--r--. 1 oracle asmadmin 2.4K Jun 2 22:30 exportt01.log [oracle@sywu backup]$ cat exportt01.log Export: Release 11.2.0.3.0 - Production on Tue Jun 2 18:42:17 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 "OPS$SYWU"."EXPORTTB_BYSIZE": userid=ops$sywu/******** job_name=exporttb_bysize SCHEMAS=ops$sywu filesize=10485760 dumpfile=size_each_sywu.dump,file02.dmp,file03.dmp,file04.dmp directory=pump_dir logfile=exportt01.log Estimate in progress using BLOCKS method... Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA Total estimation using BLOCKS method: 104 MB Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA Processing object type SCHEMA_EXPORT/TABLE/TABLE Processing object type SCHEMA_EXPORT/TABLE/COMMENT Processing object type SCHEMA_EXPORT/PACKAGE/PACKAGE_SPEC Processing object type SCHEMA_EXPORT/PACKAGE/COMPILE_PACKAGE/PACKAGE_SPEC/ALTER_PACKAGE_SPEC Processing object type SCHEMA_EXPORT/TABLE/INDEX/INDEX Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/CONSTRAINT Processing object type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS Processing object type SCHEMA_EXPORT/PACKAGE/PACKAGE_BODY Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS ORA-39095: Dump file space has been exhausted: Unable to allocate 4096 bytes Job "OPS$SYWU"."EXPORTTB_BYSIZE" stopped due to fatal error at 18:42:36 Job EXPORTTB_BYSIZE has been reopened at Tuesday, 02 June, 2015 22:28 Restarting "OPS$SYWU"."EXPORTTB_BYSIZE": userid=ops$sywu/******** job_name=exporttb_bysize SCHEMAS=ops$sywu filesize=10485760 dumpfile=size_each_sywu.dump,file02.dmp,file03.dmp,file04.dmp directory=pump_dir logfile=exportt01.log . . exported "OPS$SYWU"."TB01" 74.64 MB 844416 rows . . exported "OPS$SYWU"."TB02" 452.3 KB 13448 rows . . exported "OPS$SYWU"."T_EXCE" 5.820 KB 2 rows Master table "OPS$SYWU"."EXPORTTB_BYSIZE" successfully loaded/unloaded ****************************************************************************** Dump file set for OPS$SYWU.EXPORTTB_BYSIZE is: /u01/backup/size_each_sywu.dump /u01/backup/file02.dmp /u01/backup/file03.dmp /u01/backup/file04.dmp /u01/backup/file05.dmp Job "OPS$SYWU"."EXPORTTB_BYSIZE" completed with 1 error(s) at 22:30:38 1.3导出某个schema下的数据

  对于导出schema下的数据,建议使用sysdba用户导出,因为随着系统的复杂和环境不一,某些时候依赖的包、对象、存储过程可能是属于另一个用户的,导出时被导出schema未必具有完全的权限,同时还要考虑导入的目的地环境;当然万事没有绝对,完全取决于应用;

expdp userid='sys/oracle as sysdba' job_name=export_schema SCHEMAS='ops$sywu' directory=pump_dir dumpfile=schema_sywu.dmp logfile=schema_sywu.log 1.4整库导出

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/43bf65e73c0c33098e3a92024cfde3a3.html