oracle的dump文件太大,expdp在限定文件大小时,注意dump文件名字变化【zt】

博客介绍了在Oracle数据库中使用expdp工具进行数据导出时,如何通过filesize参数限定单个文件大小,并通过%U参数自动创建多个文件以避免空间耗尽的问题。内容包括了expdp命令的使用示例,以及在限定大小后文件名的变化情况。
摘要由CSDN通过智能技术生成

使用expdp限定文件大小,使用filesize

注意一点在限定文件大小时,注意dump文件名字变化.

测试如下

directory dumpdir as '/data01' ;

Directory created.

write,read on directory dumpdir to yxyup ;

Grant succeeded.

#expdp yxyup/password dumpfile=yxyup.dump directory=dumpdir filesize=2m

Export: Release 10.2.0.3.0 - Production on Thursday, 28 August, 10:46:57

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

Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Production

With the Partitioning, Oracle Label Security, OLAP and Data Mining Scoring Engine options

Starting "YXYUP"."SYS_EXPORT_SCHEMA_01":  yxyup/******** dumpfile=yxyup.dump directory=dumpdir filesize=2m

Estimate in progress using BLOCKS method...

Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA

Total estimation using BLOCKS method: 12 MB

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/PRE_SCHEMA/PROCACT_SCHEMA

Processing object type SCHEMA_EXPORT/TABLE/TABLE

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/TABLE/COMMENT

Processing object type SCHEMA_EXPORT/PROCEDURE/PROCEDURE

Processing object type SCHEMA_EXPORT/PROCEDURE/ALTER_PROCEDURE

Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS

Processing object type SCHEMA_EXPORT/POST_SCHEMA/PROCACT_SCHEMA

ORA-39095: Dump file space has been exhausted: Unable to allocate 4096 bytes

---以上可以看到在绝对固定dump出来的文件时,报错.

使用%U,使文件名顺序产生.

#expdp yxyup/password dumpfile=yxyup_%U.dump directory=dumpdir filesize=2m

Export: Release 10.2.0.3.0 - Production on Thursday, 28 August, 2008 10:51:45

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

Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Production

With the Partitioning, Oracle Label Security, OLAP and Data Mining Scoring Engine options

Starting "YXYUP"."SYS_EXPORT_SCHEMA_04":  yxyup/******** dumpfile=yxyup_%U.dump directory=dumpdir filesize=2m

Estimate in progress using BLOCKS method...

Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA

Total estimation using BLOCKS method: 13 MB

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/PRE_SCHEMA/PROCACT_SCHEMA

Processing object type SCHEMA_EXPORT/TABLE/TABLE

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/TABLE/COMMENT

Processing object type SCHEMA_EXPORT/PROCEDURE/PROCEDURE

Processing object type SCHEMA_EXPORT/PROCEDURE/ALTER_PROCEDURE

Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS

Processing object type SCHEMA_EXPORT/POST_SCHEMA/PROCACT_SCHEMA

. . exported "YXYUP"."TEST01"                            4.706 MB   50400 rows

. . exported "YXYUP"."TEST_BAK"                          4.706 MB   50397 rows

. . exported "YXYUP"."SYS_EXPORT_SCHEMA_03"              309.6 KB    1081 rows

. . exported "YXYUP"."SYS_EXPORT_SCHEMA_02"              224.8 KB    1074 rows

. . exported "YXYUP"."SYS_EXPORT_SCHEMA_01"              139.4 KB    1063 rows

Master table "YXYUP"."SYS_EXPORT_SCHEMA_04" successfully loaded/unloaded

******************************************************************************

Dump file set for YXYUP.SYS_EXPORT_SCHEMA_04 is:

/data01/yxyup_01.dump

/data01/yxyup_02.dump

/data01/yxyup_03.dump

/data01/yxyup_04.dump

/data01/yxyup_05.dump

/data01/yxyup_06.dump

Job "YXYUP"."SYS_EXPORT_SCHEMA_04" successfully completed at 10:51:53

#ll

total 21664

-rw-r--r-- 1 oracle dba       13 Aug  8 23:19 a.txt

-rw-r--r-- 1 oracle dba     2188 Aug 28 10:51 export.log

drwx------ 2 oracle dba    16384 Aug  8 23:06 lost+found

-rw-r----- 1 oracle dba  2097152 Aug 28 10:51 yxyup_01.dump

-rw-r----- 1 oracle dba  2097152 Aug 28 10:51 yxyup_02.dump

-rw-r----- 1 oracle dba  2097152 Aug 28 10:51 yxyup_03.dump

-rw-r----- 1 oracle dba  2097152 Aug 28 10:51 yxyup_04.dump

-rw-r----- 1 oracle dba  2097152 Aug 28 10:51 yxyup_05.dump

-rw-r----- 1 oracle dba   565248 Aug 28 10:51 yxyup_06.dump

-rw-r----- 1 oracle dba 11030528 Aug 28 10:50 yxyup.dump

http://space.itpub.net/7364032/viewspace-438681

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值