expdp在限定檔案大小時,注意dump檔名字變化【zt】

season0891發表於2011-06-20

使用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



來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/90618/viewspace-700295/,如需轉載,請註明出處,否則將追究法律責任。

相關文章