使用expdp限定文件大小,使用filesize
注意一点在限定文件大小时,注意dump文件名字变化.
测试如下
SYS@dbatest>createdirectory dumpdir as '/data01' ;
Directory created.
SYS@dbatest>grantwrite,read on directory dumpdir to yxyup ;
Grant succeeded.
oracle@dbatest1:/data01#expdp yxyup/password dumpfile=yxyup.dump directory=dumpdir filesize=2m
Export: Release 10.2.0.3.0 - Production on Thursday, 28 August, 2008 10:46:57
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_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,使文件名顺序产生.
oracle@dbatest1:/data01#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
oracle@dbatest1:/data01#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
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/90618/viewspace-700295/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/90618/viewspace-700295/