FILESIZE引數 – 輸出寫入到多個匯出檔案
1. 適用於:
甲骨文公司伺服器 - 企業版 - 版本:8.1.7至10.2
甲骨文公司伺服器 - 個人版 - 版本:8.1.7至10.2
甲骨文公司伺服器 - 標準版 - 版本:8.1.7至10.2
本文件中的資訊適用於任何平臺。
2. 目的:
本文件提供當從Oracle資料庫匯出資料或將資料匯入回到Oracle資料庫中時有關使用FILESIZE引數資訊。
3. 範圍和應用:
本手冊適用於要使用EXPORT實用程式從Oracle資料庫中匯出資料,並建立多個匯出轉儲檔案,而不是一個單一的(通常是非常大)匯出轉儲檔案的Oracle8i,Oracle9i以及Oracle10g資料庫的使用者。手冊提供了有關使用FILESIZE引數,典型的錯誤資訊,和一些相關的缺陷與可能的解決方法的資訊。
4. 簡介:
1) 預設情況下,輸出將資料寫入一個出口轉存,直至達到最大大小。可以在一個檔案中儲存的最大值是依賴於您的作業系統。另見:
注:62427.1 “2GB或不2GB - 檔案限制在Oracle”
2) 首先介紹Oracle8i,輸出支援寫入到多個出口檔案,輸入可以讀入多個出口檔案。如果你給FILESIZE引數指定一個值(位元組的限制),出口將只寫入轉儲檔案您指定的位元組大小的資料。
3) 在Oracle9i及更高版本的伺服器上,FILESIZE引數有一個最大的值,這個值等於可以儲存在64位(16EB(艾位元組)= 16384 PB(PB級)=16777216TB(TB級)=17179869184GB(千兆位元組))的最大值。
4) 經典輸出客戶端(EXP)沒有一個真正的轉儲檔案的最佳大小。即使我們只從一個非常大的轉儲匯入一張小表,我們業要通讀完整的轉儲檔案。
5) 請注意這與Oracle10g的資料泵的客戶端(expdp和impdp)不同。如果我們從多個轉儲檔案匯入一張小表,我們只能讀取資料泵轉儲檔案頭,而且我們讀取的資料泵主表可能是儲存在較後位置的轉儲檔案之一。基於主表中的資訊,我們確定該小表處在的轉儲檔案(S),然後我們只讀那些特定的轉儲檔案(S)。
6) 相比於處理多個小檔案,從檔案檢視點處理一個單一的大型輸出轉儲檔案更加困難。 因此,250GB的資料,如果需要匯出,建議建立多個較小的檔案,例如:指定FILESIZE=25G,建立10個規模較小的轉儲檔案。
7) 匯出到磁帶裝置時,不使用FILESIZE引數,而使用VOLSIZE引數。有關詳情,請參閱:
注:30428.1 “Unix系統上的匯出到磁帶””
8) 當匯出到一個命名管道,不推薦使用FILESIZE引數。 如果使用FILESIZE引數時使用命名管道,請確保您預先為每個出口轉存檔案建立一個命名管道。有關詳情,請參閱:
注:30528.1 “使用匯出(EXP - 2 EXP-15),匯入(IMP-2IMP-21),或SQL * Loader時的大檔案的問題(2GB +)”
5. 出口引數的用法:FILESIZE
如果你不指定檔案大小(注意,0值相當於不指定FILESIZE)值,不管在File引數指定的檔案數量是多少,輸出都將寫入一個檔案。
如果您匯出檔案所需的空間超過可用的磁碟空間,出口將中止操作,待提供足夠的磁碟空間後,輸出操作才可以重複並完成。
FILESIZE值可以指定為KB(千位元組數)級。例如,FILESIZE=2KB和FILESIZE= 2048是相同的。同樣,MB指定兆位元組(1024 * 1024)和GB指定千兆位元組(1024** 3)。
B為位元組的簡寫;該數字不用繼續乘以位元組大小而獲得最終的檔案大小(FILESIZE=2048B即是FILESIZE= 2048)。
FILESIZE=0(預設)輸出寫入到一個單一的檔案
FILESIZE=1024或:
FILESIZE=1K或:
FILESIZE=1KB輸出寫入1千位元組的檔案
FILESIZE=1M或:
FILESIZE=1MB輸出寫入1兆位元組的檔案
FILESIZE=1G或:
FILESIZE= 1GB,輸出寫入1千兆位元組的檔案
當輸出寫入的資料量超過FILESIZE指定的最大值,輸出會從File引數中得到下一個輸出檔案的名稱,如果它已經使用了所有的File引數指定的名稱,輸出會提示您提供了一個新的輸出檔名。
如果輸出的資料量不適合提供的檔案清單,輸出將提示需要更多的檔名。
如果在後臺執行的輸出程式,確保給輸出提供足夠的檔名。在等待您提供額外的檔名時輸出程式會掛起,而您可能不能發現檔名不夠用。
例如:執行一個完整的資料庫輸出的直接路徑和建立750 MB輸出轉儲檔案:
File: exp.par
-------------
FILESIZE=750MB
FILE=exp_f1.dmp,exp_f2.dmp,
exp_f3.dmp,exp_f4.dmp
FULL=Y
DIRECT=Y
LOG=exp_full.log
% exp system/manager PARFILE=exp.par
注1: 當出口分配一個新的出口轉儲檔案,這將記錄在在出口日誌中。
E.g:
...
continuing export into file exp_f2.dmp
...
注2: 已指定File引數,但是出口不需要這個檔案,則該指定的FILE不會被建立。
例如:在上面的例子,如果輸出總額為2 GB,然後輸出將建立3個檔案:
- exp_f1.dmp with size of 750 Mb
- exp_f2.dmp with size of 750 Mb
- exp_f3.dmp with size of 500 Mb
注3: 如果出口需要更多的檔案,將資料匯出,它會提示一個新的檔名。
例如:在上面的例子,如果出口總額為3.5 GB,然後出口將建立4個750 MB的檔案,並會提示為剩餘的500 MB資料建立新檔案。鍵入下一個出口轉儲檔案的檔名後,出口將繼續下去。
Example:
...
Export file: EXPDAT.DMP > exp_f5.dmp
...
注4 請注意,File引數指定檔名的命令列語法是:
---命令列模式可能的語法(2例):
E.g:
%exp...file=exp_f1.dmp exp_f2.dmp exp_f3.dmp exp_f4.dmp...
%exp...file=exp_f1.dmp,exp_f2.dmp,exp_f3.dmp,exp_f4.dmp ...
或者在Windows系統(3附例):
D:\>exp...file=(exp_f1.dmp exp_f2.dmp exp_f3.dmp exp_f4.dmp)...
D:\>exp...file=(exp_f1.dmp,exp_f2.dmp,exp_f3.dmp,exp_f4.dmp)...
D:\>exp...file="exp_f1.dmp,exp_f2.dmp,exp_f3.dmp,exp_f4.dmp"...
或者在Unix系統(3附例):
% exp... file=\(exp_f1.dmp exp_f2.dmp exp_f3.dmp exp_f4.dmp\)...
% exp...file=\(exp_f1.dmp,exp_f2.dmp,exp_f3.dmp,exp_f4.dmp\)...
% exp...file='exp_f1.dmp,exp_f2.dmp,exp_f3.dmp,exp_f4.dmp' ...
6. 進口引數:FILESIZE
輸入資料時,必須使用匯入引數FILESIZE告訴匯入最大的出口指定轉儲檔案的大小。FILESIZE值可以指定為KB(千位元組數)級。例如,FILESIZE=2KB和FILESIZE= 2048是相同的。同樣,MB指定兆位元組(1024 * 1024)和GB指定千兆位元組(1024** 3)。
B為位元組的簡寫;該數字不用繼續乘以位元組大小而獲得最終的檔案大小(FILESIZE=2048B即是FILESIZE= 2048)。
FILESIZE=0(預設)出口讀取一個單一的檔案
FILESIZE=1024或:
FILESIZE=1K或:
FILESIZE=1KB出口讀取1千位元組的檔案
FILESIZE=1M或:
FILESIZE=1MB出口讀取1兆位元組的檔案
FILESIZE=1G或:
FILESIZE= 1GB,出口讀取1千兆位元組的檔案
例如:從上面建立的出口轉儲檔案執行一個表級別的進口程式。
File: imp.par
-------------
FILESIZE=750MB
FILE=exp_f1.dmp,exp_f2.dmp,
exp_f3.dmp,exp_f4.dmp
FROMUSER=scott
TOUSER=scott
TABLES=emp
LOG=imp_emp.log
% imp system/manager PARFILE=imp.par
注1 :如果檔案引數(如在輸出過程中檔案exp_f4.dmp未被建立)中列出的檔案太多,這些檔名會被忽略。
注2 :如果沒有列出的所有檔名,進口將主動要求下一個檔名。
例如如果進口開始指定了 exp_f1.dmp,exp_f2.dmp兩個檔案而沒有提到第三個或最後的檔名exp_f3.dmp,進口會提示為剩餘資料建立新的檔名。輸入正確的檔名後,進口程式將繼續下去。
例如:
...
Import file: EXPDAT.DMP > exp_f3.dmp
...
7. 出口可能的警告和錯誤:
1) EXP-75: FILESIZE四捨五入式下降
FILESIZE引數指定的值是RECORDLENGTH引數值的倍數。如果這是不正確的,那麼FILESIZE引數值將下調自動:
% exp system/manager FILE=exp_f1.dmp, exp_f2.dmp, exp_f3.dmp, \
exp_f4.dmp LOG=exp_f.log FILESIZE=1000m \
DIRECT=y RECORDLENGTH=65535 FULL=y
Export: Release 10.2.0.3.0 - Production on Thu Dec 20 17:19:13 2007
Copyright (c) 1982, 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
EXP-00075: rounding FILESIZE down, new value is 1048560000
Export done in WE8ISO8859P15 character set and AL16UTF16 NCHAR character set
About to export the entire database ...
...
解決辦法:忽略警告或指定FILESIZE引數為RECORDLENGTH的倍數:
%exp system/manager FILE=exp_f1.dmp, exp_f2.dmp, exp_f3.dmp, \
exp_f4.dmp LOG=exp_f.log FILESIZE=1048560000 \
DIRECT=y RECORDLENGTH=65535 FULL=y
注1:確保進口時也使用FILESIZE新指定值。
注2:有關引數RECORDLENGTH的詳細資訊,請參閱:
注3:155477.1 “直接引數:常規路徑匯出與直接路徑匯出的比較”
2) EXP-73:轉儲檔案太小
如果FILESIZE引數值小於RECORDLENGTH引數值,將產生一個錯誤。例如如果出口開始於RECORDLENGTH= 8192和FILESIZE =4KB。
% exp system/manager FILE=exp_f1.dmp, exp_f2.dmp, exp_f3.dmp, \
exp_f4.dmp LOG=exp_f.log FILESIZE=64k \
DIRECT=y RECORDLENGTH=65535 FULL=y
Export: Release 10.2.0.3.0 - Production on Thu Dec 20 17:39:12 2007
Copyright (c) 1982, 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
EXP-00075: rounding FILESIZE down, new value is 65535
EXP-00073: dump file size too small
EXP-00000: Export terminated unsuccessfully
解決方案:FILESIZE引數,如指定一個較大的值:
%exp system/manager FILE=exp_f1.dmp,exp_f2.dmp,exp_f3.dmp, \
exp_f4.dmp LOG=exp_f.log FILESIZE=640m \
DIRECT=y RECORDLENGTH=65535 FULL=y
3) EXP-2:錯誤寫入匯出檔案
如果沒有足夠的空間供出口寫入到轉儲檔案,或另一個程式阻止出口寫入轉儲檔案,出口會因為如下一些錯誤中止:
...
EXP-00030: Unexpected End-Of-File encountered while reading input
.. exporting table EMP_LONG error clossing export file
EXP-00002: Error in writing to export file
EXP-00002: Error in writing to export file
EXP-00000: Export terminated unsuccessfully
解決方法:確保有足夠的自由空間來建立檔案,確保該磁碟沒有任何錯誤,確保其他程式(如防病毒掃描)不會阻止出口寫入檔案,並重新執行出口。
8. 匯入時可能的警告和錯誤:
1) IMP-46:使用出口檔案FILESIZE值
如果沒有值指定在進口程式中的FILESIZE引數,將產生一個警告。然而,進口程式將繼續:
% imp system/manager FILE=exp_f1.dmp, exp_f2.dmp, exp_f3.dmp \
exp_f4.dmp LOG=imp_emp.log \
FROMUSER=scott TOUSER=scott TABLES=emp
Import: Release 10.2.0.3.0 - Production on Thu Dec 20 18:00:48 2007
Copyright (c) 1982, 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
Export file created by EXPORT:V10.02.01 via direct path
import done in WE8ISO8859P15 character set and AL16UTF16 NCHAR character set
IMP-00046: using FILESIZE value from export file of 786432000
...
Import terminated successfully with warnings.
解決辦法:忽略警告,下一次從這個出口轉儲檔案集輸入時,指定正確的值FILESIZE引數,如:
% imp system/manager FILE=exp_f1.dmp,exp_f2.dmp,exp_f3.dmp \
exp_f4.dmp LOG=imp_emp.log FILESIZE=750m \
FROMUSER=scott TOUSER=scott TABLES=emp
2) IMP-47:意外的檔案序列號
如果以錯誤的順序列出檔名,系統報告錯誤,進口程式將中止,例如:
% imp system/manager FILE=exp_f3.dmp, exp_f2.dmp, exp_f1.dmp \
exp_f4.dmp LOG=imp_emp.log FILESIZE=750m \
FROMUSER=scott TOUSER=scott TABLES=emp
Import: Release 10.2.0.3.0 - Production on Thu Dec 20 18:05:04 2007
Copyright (c) 1982, 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
Export file created by EXPORT:V10.02.01 via direct path
import done in WE8ISO8859P15 character set and AL16UTF16 NCHAR character set
IMP-00047: unexpected file sequence number; expected 1 but found 3
IMP-00132: first file in the multi-file export is exp_f1.dmp
IMP-00000: Import terminated unsuccessfully
Or:
% imp system/manager FILE=exp_f1.dmp, exp_f3.dmp, exp_f2.dmp \
exp_f4.dmp LOG=imp_emp.log FILESIZE=750m \
FROMUSER=scott TOUSER=scott TABLES=emp
Import: Release 10.2.0.3.0 - Production on Thu Dec 20 18:13:39 2007
Copyright (c) 1982, 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
Export file created by EXPORT:V10.02.01 via direct path
import done in WE8ISO8859P15 character set and AL16UTF16 NCHAR character set
IMP-00047: unexpected file sequence number; expected 2 but found 3
IMP-00132: first file in the multi-file export is exp_f1.dmp
IMP-00008: unrecognized statement in the export file:
...
解決方案:以正確的順序指定轉儲檔案,例如:
%imp system/manager FILE=exp_f1.dmp,exp_f2.dmp,exp_f3.dmp \
exp_f4.dmp LOG=imp_emp.log FILESIZE=750m \
FROMUSER=scott TOUSER=scott TABLES=emp
3) IMP-40:FILESIZE與出口程式使用的值不匹配
如果錯誤的FILESIZE值在進口過程中被指定(例如指定FILESIZE=75m,而非FILESIZE=750m),將報告錯誤:
% imp system/manager FILE=exp_f1.dmp, exp_f2.dmp, exp_f3.dmp \
exp_f4.dmp LOG=imp_emp.log FILESIZE=75m \
FROMUSER=scott TOUSER=scott TABLES=emp
Import: Release 10.2.0.3.0 - Production on Thu Dec 20 18:18:26 2007
Copyright (c) 1982, 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
Export file created by EXPORT:V10.02.01 via direct path
import done in WE8ISO8859P15 character set and AL16UTF16 NCHAR character set
IMP-00040: FILESIZE does not match the value used for export: 786432000
IMP-00000: Import terminated unsuccessfully
解決方案:重新啟動進口,並給FILESIZE引數指定正確的值,如:
% imp system/manager FILE=exp_f1.dmp,exp_f2.dmp,exp_f3.dmp\
exp_f4.dmp LOG=imp_emp.log FILESIZE=750m \
FROMUSER=scott TOUSER=scott TABLES=emp
4) IMP-2:未能開啟讀取檔案
如果你錯誤地指定了一個不正確的檔名,進口將提示輸入正確的檔名:
% imp system/manager FILE=exp_f1.dmp, exp_f2.dmp, exp_f3.dmp \
exp_f4.dm LOG=imp_emp.log FILESIZE=750m \
FROMUSER=scott TOUSER=scott TABLES=emp
Import: Release 10.2.0.3.0 - Production on Thu Dec 20 18:21:02 2007
Copyright (c) 1982, 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
Export file created by EXPORT:V10.02.01 via direct path
import done in WE8ISO8859P15 character set and AL16UTF16 NCHAR character set
IMP-00002: failed to open exp_f4.dm for read
Import file: EXPDAT.DMP >
解決方案:指定正確的檔名,或者以正確的名稱重新啟動進口轉儲檔案:
...
Import file: EXPDAT.DMP > exp_f4.dmp
...
5) IMP-48:檔案頭不匹配
如果你錯誤地指定了一個錯誤的檔名,可能發生以下錯誤:
% imp system/manager FILE=exp_f1.dmp, exp_f2.dmp, exp_f3.dmp \
exp_f.log LOG=imp_emp.log FILESIZE=750m \
FROMUSER=scott TOUSER=scott TABLES=emp
Import: Release 10.2.0.3.0 - Production on Thu Dec 20 18:28:26 2007
Copyright (c) 1982, 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
Export file created by EXPORT:V10.02.01 via direct path
import done in WE8ISO8859P15 character set and AL16UTF16 NCHAR character set
IMP-00048: mismatched file header
IMP-00008: unrecognized statement in the export file:
IMP-00000: Import terminated unsuccessfully
-- or import aborts with:
...
IMP-00048: mismatched file header
IMP-00009: abnormal end of export file
IMP-00000: Import terminated unsuccessfully
解決方案:重新啟動的進口,並指定一系列正確的轉儲檔案的名稱,如:
%impsystem/manager FILE=exp_f1.dmp,exp_f2.dmp,exp_f3.dmp\
exp_f4.dmp LOG=imp_emp.log FILESIZE=750m \
FROMUSER=scott TOUSER=scott TABLES=emp
Parameter FILESIZE - Make Export Write To Multiple Export Files (文件 ID 290810.1)
In this Document
|
Purpose |
|
Scope |
|
Details |
|
1. Introduction. |
|
2. Usage of Export Parameter: FILESIZE |
|
3. Usage of Import Parameter: FILESIZE |
|
4. Possible Warnings and Errors upon Export. |
|
5. Possible Warnings and Errors upon Import. |
|
6. Known Defects. |
|
References |
APPLIES TO:
Oracle Database - Enterprise Edition - Version 8.1.7.0 to 11.2.0.4 [Release 8.1.7 to 11.2]Oracle Database Cloud Schema Service - Version N/A and later
Oracle Database Exadata Cloud Machine - Version N/A and later
Oracle Cloud Infrastructure - Database Service - Version N/A and later
Oracle Database Backup Service - Version N/A and later
Information in this document applies to any platform.
***Checked for relevance on 01-Apr-2015***
NOTE: In the images and/or the document content below, the user information and data used represents fictitious data. Any similarity to actual persons, living or dead, is purely coincidental and not intended in any manner.
PURPOSE
This document provides information about the usage of the FILESIZE parameter when exporting data from an Oracle database or importing data back into an Oracle database.
SCOPE
The article is intended for users of the Oracle8i, Oracle9i, and Oracle10g database who wish to use the EXPORT utility to export data from an Oracle database and create multiple export dump files, rather than one single (and usually very large) export dump file. The article gives information about the usage of the FILESIZE parameter, typical error messages, and some related defects with possible workarounds.
Original Export is desupported for general use as of Oracle Database 11g. The only supported use of original Export in Oracle Database 11g is backward migration of XMLType data to Oracle Database 10g release 2 (10.2) or earlier. Therefore, Oracle recommends that you use the new Data Pump Export and Import utilities, except in the following situations which require original Export and Import:
Please refer to:
http://docs.oracle.com/database/121/SUTIL/original_export.htm#SUTIL3634
DETAILS
1. Introduction.
-
By default, an export writes data to one export dumpfile until the maximum size is reached. The maximum value that can be stored in a file is dependent on your operating system. See also:
Note 62427.1 - 2Gb or Not 2Gb - File limits in Oracle
-
Starting with Oracle8i, export supports writing to multiple export files, and Import can read from multiple export files. If you specify a value (byte limit) for the FILESIZE parameter, Export will write only the number of bytes you specify to each dump file.
-
In Oracle9i and higher, the FILESIZE parameter has a maximum value equal to the maximum value that can be stored in 64 bits (16 EB (exabyte) = 16384 PB (petabyte) = 16777216 TB (terabyte) = 17179869184 Gb (gigabyte)).
-
With the classic export client (exp) there is not a real optimal size for the dumpfiles. Even if we have to import one small table from a very large dumpfile, we have to read through the complete dumpfile.
Note that this is different with Oracle10g's Data Pump clients (expdp and impdp). If we have to import one small table from multiple dumpfiles, we only read the headers of the Data Pump dumpfiles, and we read the Data Pump Master Table which is stored in one of the last dumpfiles. Based on the information in the master table we determine in which dumpfile(s) the small table is located, and then we read only those specific dumpfile(s).
-
From file handling point-of-view one single large export dumpfile is more difficult to handle than multiple smaller files. Therefore if 250 Gb of data needs to be exported, it is recommended to create multiple smaller files, e.g. specify FILESIZE=25G to create 10 smaller dumpfiles.
-
When exporting to a tape device, do not use the FILESIZE parameter, but use the VOLSIZE parameter instead. For details, see also:
Note 30428.1 - Exporting to Tape on Unix System
-
When exporting to a named pipe, it is not recommended to use the FILESIZE parameter. When the FILESIZE parameter is used in combination with a named pipe, ensure that you pre-create one named pipe for each export dumpfile. For details, see also:
Note 30528.1 - Large File Issues (2Gb+) when Using Export (EXP-2 EXP-15), Import (IMP-2 IMP-21), or SQL*Loader
2. Usage of Export Parameter: FILESIZE
If you do not specify a value for FILESIZE (note that a value of 0 is equivalent to not specifying FILESIZE), then Export will write to only one file, regardless of the number of files specified in the FILE parameter.
If the space requirements of your export file exceed the available disk space, Export will abort, and you will have to repeat the Export after making sufficient disk space available.
The FILESIZE value can be specified as a number followed by KB (number of kilobytes). For example, FILESIZE=2KB is the same as FILESIZE=2048. Similarly, MB specifies megabytes (1024 * 1024) and GB specifies gigabytes (1024**3).
'B' remains the shorthand for bytes; the number is not multiplied to obtain the final file size (FILESIZE=2048B is the same as FILESIZE=2048).
FILESIZE=1024 or:
FILESIZE=1K or:
FILESIZE=1KB causes export to write to 1 kilobyte files
FILESIZE=1M or:
FILESIZE=1MB causes export to write to 1 Megabyte files
FILESIZE=1G or:
FILESIZE=1GB causes export to write to 1 Gigabyte files
When the amount of data Export must write, exceeds the maximum value you specified for FILESIZE, it will get the name of the next export file from the FILE parameter or, if it has used all the names specified in the FILE parameter, it will prompt you to provide a new export filename.
If the amount of data exported does not fit in the list of files provided, export will prompt for more filenames.
Ensure to provide enough filenames to the export if running the export in the background. The export may hang while waiting for you to provide it with additional filenames which you will not be able to do.
Example : run a direct path full database export and create export dumpfiles with a size of 750 Mb:
-------------
FILESIZE=750MB
FILE=exp_f1.dmp,exp_f2.dmp,
exp_f3.dmp,exp_f4.dmp
FULL=Y
DIRECT=Y
LOG=exp_full.log
% exp system/<password> PARFILE=exp.par
Remark 1
. When export allocates a new export dumpfile, this will be logged in the export logfile, e.g.:
continuing export into file exp_f2.dmp
...
Remark 2
. Filenames that have been specified with the FILE parameter, and that are not needed for this export, will not be created.
E.g.: in the example above, if the total export is 2 Gb, then export will create 3 files:
- exp_f1.dmp with size of 750 Mb
- exp_f2.dmp with size of 750 Mb
- exp_f3.dmp with size of 500 Mb
Remark 3
. If export needs more files to export the data, it will prompt for a new filename.
E.g.: in the example above, if the total export is 3.5 Gb, then export will create 4 files with size of 750 Mb, and will prompt for a new filename for the remaining 500 Mb of data. After typing a filename for the next export dumpfile, export will continue. Example:
Export file: EXPDAT.DMP > exp_f5.dmp
...
Remark 4
. Note that the command line syntax to specify filenames for the FILE parameter is:
% exp ... file=exp_f1.dmp exp_f2.dmp exp_f3.dmp exp_f4.dmp ...
% exp ... file=exp_f1.dmp,exp_f2.dmp,exp_f3.dmp,exp_f4.dmp ...
-- or on Windows (3 additional examples):
D:\> exp ... file=(exp_f1.dmp exp_f2.dmp exp_f3.dmp exp_f4.dmp) ...
D:\> exp ... file=(exp_f1.dmp,exp_f2.dmp,exp_f3.dmp,exp_f4.dmp) ...
D:\> exp ... file="exp_f1.dmp,exp_f2.dmp,exp_f3.dmp,exp_f4.dmp" ...
-- or on Unix (3 additional examples):
% exp ... file=\(exp_f1.dmp exp_f2.dmp exp_f3.dmp exp_f4.dmp\) ...
% exp ... file=\(exp_f1.dmp,exp_f2.dmp,exp_f3.dmp,exp_f4.dmp\) ...
% exp ... file='exp_f1.dmp,exp_f2.dmp,exp_f3.dmp,exp_f4.dmp' ...
3. Usage of Import Parameter: FILESIZE
Upon import, you must use the Import parameter FILESIZE to tell Import the maximum dump file size you specified on export. The FILESIZE value can be specified as a number followed by KB (number of kilobytes). For example, FILESIZE=2KB is the same as FILESIZE=2048. Similarly, MB specifies megabytes (1024 * 1024) and GB specifies gigabytes (1024**3).
'B' remains the shorthand for bytes; the number is not multiplied to obtain the final file size (FILESIZE=2048B is the same as FILESIZE=2048).
FILESIZE=1024 or:
FILESIZE=1K or:
FILESIZE=1KB causes export to read from 1 kilobyte files
FILESIZE=1M or:
FILESIZE=1MB causes export to read from 1 Megabyte files
FILESIZE=1G or:
FILESIZE=1GB causes export to read from 1 Gigabyte files
Example : to run a table level import from the export dumpfiles created above.
-------------
FILESIZE=750MB
FILE=exp_f1.dmp,exp_f2.dmp,
exp_f3.dmp,exp_f4.dmp
FROMUSER=scott
TOUSER=scott
TABLES=emp
LOG=imp_emp.log
% imp system/<password> PARFILE=imp.par
Remark 1
. If too many files are listed for the FILE parameter (e.g. file exp_f4.dmp was not created during export), those filenames will be ignored.
Remark 2
. If not all filenames are listed, import will ask for the next filename.
E.g. if import was started with FILE=exp_f1.dmp,exp_f2.dmp and the third and final filename exp_f3.dmp was not mentioned, import will prompt for a new filename for the remaining data. After typing the correct filename, import will continue. Example:
Import file: EXPDAT.DMP > exp_f3.dmp
...
4. Possible Warnings and Errors upon Export.
4.1. EXP-75: rounding FILESIZE down
The value specified for the FILESIZE parameter has to be a multiple of the value of RECORDLENGTH parameter. If this is not true, then the value of the FILESIZE parameter will be rounded down automatically:
exp_f4.dmp LOG=exp_f.log FILESIZE=1000m \
DIRECT=y RECORDLENGTH=65535 FULL=y
Export: Release 10.2.0.3.0 - Production on Thu Dec 20 17:19:13 2007
Copyright (c) 1982, 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
EXP-00075: rounding FILESIZE down, new value is 1048560000
Export done in WE8ISO8859P15 character set and AL16UTF16 NCHAR character set
About to export the entire database ...
...
Solution
: ignore the warning or specify a multiple of the recordlength for the FILESIZE parameter, e.g.:
exp_f4.dmp LOG=exp_f.log FILESIZE=1048560000 \
DIRECT=y RECORDLENGTH=65535 FULL=y
Remark 1
. Ensure that the new value for FILESIZE is also used upon import.
Remark 2
. For details about parameter RECORDLENGTH, see also:
Note 155477.1
- Parameter DIRECT: Conventional Path Export Versus Direct Path Export
4.2. EXP-73: dump file size too small
If the value of the FILESIZE parameter is smaller than the value of the RECORDLENGTH parameter, an error will be produced. E.g. If the export is started with RECORDLENGTH=8192 and FILESIZE=4KB
exp_f4.dmp LOG=exp_f.log FILESIZE=64k \
DIRECT=y RECORDLENGTH=65535 FULL=y
Export: Release 10.2.0.3.0 - Production on Thu Dec 20 17:39:12 2007
Copyright (c) 1982, 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
EXP-00075: rounding FILESIZE down, new value is 65535
EXP-00073: dump file size too small
EXP-00000: Export terminated unsuccessfully
Solution
: Specify a larger value for the FILESIZE parameter, e.g.:
exp_f4.dmp LOG=exp_f.log FILESIZE=640m \
DIRECT=y RECORDLENGTH=65535 FULL=y
4.3. EXP-2: Error in writing to export file
If there is insufficient space for export to write to the dumpfile, or another process prevents export to write to the dumpfile, then export may also abort with the following errors:
EXP-00030: Unexpected End-Of-File encountered while reading input
.. exporting table EMP_LONG error clossing export file
EXP-00002: Error in writing to export file
EXP-00002: Error in writing to export file
EXP-00000: Export terminated unsuccessfully
Solution:
ensure that there is enough free space to create the files, ensure that the disk does not have any errors, ensure that other processes (like anti-virus scanners) are not preventing export to write to the file, and re-run the export.
5. Possible Warnings and Errors upon Import.
5.1. IMP-46: using FILESIZE value from export file
If no value is specified for the FILESIZE parameter during the import, a warning will be produced. However, import will continue:
exp_f4.dmp LOG=imp_emp.log \
FROMUSER=scott TOUSER=scott TABLES=emp
Import: Release 10.2.0.3.0 - Production on Thu Dec 20 18:00:48 2007
Copyright (c) 1982, 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
Export file created by EXPORT:V10.02.01 via direct path
import done in WE8ISO8859P15 character set and AL16UTF16 NCHAR character set
IMP-00046: using FILESIZE value from export file of 786432000
...
Import terminated successfully with warnings.
Solution
: Ignore the warning, and next time when importing from this export dumpfile set, specify the correct value for the FILESIZE parameter, e.g.:
exp_f4.dmp LOG=imp_emp.log FILESIZE=750m \
FROMUSER=scott TOUSER=scott TABLES=emp
5.2. IMP-47: unexpected file sequence number
If the filenames are listed in the wrong order, an error will be reported and import will abort, e.g.:
exp_f4.dmp LOG=imp_emp.log FILESIZE=750m \
FROMUSER=scott TOUSER=scott TABLES=emp
Import: Release 10.2.0.3.0 - Production on Thu Dec 20 18:05:04 2007
Copyright (c) 1982, 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
Export file created by EXPORT:V10.02.01 via direct path
import done in WE8ISO8859P15 character set and AL16UTF16 NCHAR character set
IMP-00047: unexpected file sequence number; expected 1 but found 3
IMP-00132: first file in the multi-file export is exp_f1.dmp
IMP-00000: Import terminated unsuccessfully
or:
exp_f4.dmp LOG=imp_emp.log FILESIZE=750m \
FROMUSER=scott TOUSER=scott TABLES=emp
Import: Release 10.2.0.3.0 - Production on Thu Dec 20 18:13:39 2007
Copyright (c) 1982, 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
Export file created by EXPORT:V10.02.01 via direct path
import done in WE8ISO8859P15 character set and AL16UTF16 NCHAR character set
IMP-00047: unexpected file sequence number; expected 2 but found 3
IMP-00132: first file in the multi-file export is exp_f1.dmp
IMP-00008: unrecognized statement in the export file:
...
Solution:
Specify the dumpfiles in the correct order, e.g.:
exp_f4.dmp LOG=imp_emp.log FILESIZE=750m \
FROMUSER=scott TOUSER=scott TABLES=emp
5
.3. IMP-40: FILESIZE does not match the value used for export
If a wrong value for FILESIZE is specified during import (e.g. specify FILESIZE=75m instead of FILESIZE=750m), an error will be reported:
exp_f4.dmp LOG=imp_emp.log FILESIZE=75m \
FROMUSER=scott TOUSER=scott TABLES=emp
Import: Release 10.2.0.3.0 - Production on Thu Dec 20 18:18:26 2007
Copyright (c) 1982, 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
Export file created by EXPORT:V10.02.01 via direct path
import done in WE8ISO8859P15 character set and AL16UTF16 NCHAR character set
IMP-00040: FILESIZE does not match the value used for export: 786432000
IMP-00000: Import terminated unsuccessfully
Solution
: Restart the import and specify a correct value for the FILESIZE parameter, e.g.:
exp_f4.dmp LOG=imp_emp.log FILESIZE=750m \
FROMUSER=scott TOUSER=scott TABLES=emp
5.4. IMP-2: failed to open file for read
If you specify an incorrect filename by mistake, import will prompt for the correct filename:
exp_f4.dm LOG=imp_emp.log FILESIZE=750m \
FROMUSER=scott TOUSER=scott TABLES=emp
Import: Release 10.2.0.3.0 - Production on Thu Dec 20 18:21:02 2007
Copyright (c) 1982, 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
Export file created by EXPORT:V10.02.01 via direct path
import done in WE8ISO8859P15 character set and AL16UTF16 NCHAR character set
IMP-00002: failed to open exp_f4.dm for read
Import file: EXPDAT.DMP >
Solution
: specify the correct filename, or alternatively re-start the import with the correct names for the dumpfiles, e.g.:
Import file: EXPDAT.DMP > exp_f4.dmp
...
5.5. IMP-48: mismatched file header
If you specify a wrong filename by mistake, the following errors can occur:
exp_f.log LOG=imp_emp.log FILESIZE=750m \
FROMUSER=scott TOUSER=scott TABLES=emp
Import: Release 10.2.0.3.0 - Production on Thu Dec 20 18:28:26 2007
Copyright (c) 1982, 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
Export file created by EXPORT:V10.02.01 via direct path
import done in WE8ISO8859P15 character set and AL16UTF16 NCHAR character set
IMP-00048: mismatched file header
IMP-00008: unrecognized statement in the export file:
IMP-00000: Import terminated unsuccessfully
-- or import aborts with:
...
IMP-00048: mismatched file header
IMP-00009: abnormal end of export file
IMP-00000: Import terminated unsuccessfully
Solution
: Restart the import and specify the correct set of dumpfile names, e.g.:
exp_f4.dmp LOG=imp_emp.log FILESIZE=750m \
FROMUSER=scott TOUSER=scott TABLES=emp
6. Known Defects.
Bug 2040507
- FILESIZE PARAMETER SPECIFIED WITH EXP ON OS/390 NOT RECOGNIZED ON UNIX IMP
-
Symptoms
: IMP-46 and IMP-40 are possible attempting to import MVS export to another platform
-
Releases
: 9.0.1.5 and lower
-
Fixed in
: 9.2.0.1 and higher; for IBM z/OS (OS/390) a fix on top of 9.0.1.4.0 is available with
Patch 3253419
-
Workaround
: run export on a client machine with different platform, using SQL*Net to connect.
Bug 1076041
- EXPORTS THAT USE FILESIZE>4GB FAIL WITH EXP-2
-
Symptoms
: EXP-2 exporting to multiple dump files with FILESIZE >= 4Gb
-
Releases
: 8.1.5.x and 8.1.6.x
-
Fixed in
: 8.1.7.0 and higher
-
Workaround
: do not specify 4Gb filesize, but use lower value.
Bug 1522646 - INCONSISTENT BEHAVIOR OF HANDLING FILESIZE PARAMETER (not a public bug)
-
Symptoms
: No error if value for FILESIZE was too low (e.g. FILESIZE=1024)
-
Releases
: 8.1.7.4 and lower
-
Fixed in
: 9.0.1.1. and higher
-
Workaround
: specify a valid value for the FILESIZE parameter
REFERENCES
BUG:2040507 - FILESIZE PARAMETER SPECIFIED WITH EXP ON OS/390 NOT RECOGNIZED ON UNIX IMP
NOTE:155477.1 - Parameter DIRECT: Conventional Path Export Versus Direct Path Export
NOTE:30428.1 - Exporting To Tape On UNIX Systems
NOTE:30528.1 - Large File Issues (2GB+) when Using Export (EXP-2 EXP-15) Import (IMP-2 IMP-21) Or SQL*Loader
NOTE:62427.1 - 2Gb or Not 2Gb - File limits in Oracle