oracle 中Export File Size 2Gb大檔案 簡介

來源:互聯網
上載者:User

我的總結,肯定對你有協助:  
   
  2Gb   Export   File   Size  
   
  本文寫作時大多數的export   版本使用預設的檔案處理API   來建立export   文

件。這意味著在相當多的平台上,不能匯出大於2GB   的檔案。  
   
  以下是一些克服的方法:  
          通常可以匯出大於2GB   的檔案到裸裝置上。  
          在Unix   上可以使用具名管道來壓縮/分割檔案  
          可以匯出到磁碟上  
          ORACLE8i   允許匯出到多個檔案而不是一個大的檔案  
   
   
   
   
  其他的2GB   匯出問題  
   
  ORACLE   最大extent   的大小為2GB.不幸的是許多發行版本的ORACLE   中的

export都有一個問題,就是當指定compress=y   時,可能匯出的檔案中其Next   存

儲子句會出現大於2GB   的情況。這會導致即使指定了ignore=y   時,import   也

會出錯。  
   
  compress=y   肯能修改storage子句initial子句,指定輸出是否壓縮片段的資料區段

,便於在重建時使用大的extent.  
   
  本問題可參見[BUG:708790]和[NOTE:62436.1]  
   
   
   
   
  典型的2GB+時export   錯誤:  
  .   .   exporting   table   BIGEXPORT  
  EXP-00015:   error   on   row   10660   of   table  
  BIGEXPORT,  
  column   MYCOL,   datatype   96  
  EXP-00002:   error   in   writing   to   export   file  
  EXP-00002:   error   in   writing   to   export   file  
  EXP-00000:   Export   terminated   unsuccessfully  
   
   
  在[BUG:185855]中還提到了一個問題:當匯出全庫時產生的create   tablespace  

命令會使用bytes   作為單位。當import   時,產生的資料檔案若大於2GB,可能導

致ora-2237   錯誤。  
  解決辦法是先建立資料表空間(用M   代替bytes),然後匯入檔案。  
   
  補充:  
   
  export   大檔案可以採取的方法:  
  1.   裸裝置  
  比如直接倒出到/dev/rlvtest   等。  
   
  2.   具名管道(Unix   下)  
  mknod   /tmp/imp_pipe   p  
  compress   <   /tmp/exp_pipe   >   export.dmp.Z   &  
  exp   file=/tmp/exp_pipe   userid=xxx/xxx   tables=...  
   
  mknod   /tmp/imp_pipe   p  
  uncompress   <   export.dmp.Z>/tmp/imp_pipe   &  
  imp   file=/tmp/imp_pipe   userid=xxx/xxx   tables=...  
   
  3.壓縮/檔案拆分:(以下只在ksh   中有效:)  
  echo   |exp   file=>(compress   |   split   -b   1024m   -   expdmp-)  

userid=xxx/xxx   tables=...  
  echo   |   imp   file=<(cat   expdmp-   *   |zcat)   userid=xxx/xxx  

tables=...  
   
  4.可以直接倒出到磁帶  
  比如exp   file=/dev/rmt0   ....  
   
  5。可以在ORACLE8i+版本裡面,通過使用filesize   和file   相結合,倒出產生

多個檔案.  
**************************************************************
5. 命令列-完全匯出
  
  exp userid=cams/cams@cams full=y inctype=complete
  file=(/tmp/2004020601.dmp, /tmp/2004020602.dmp, /tmp/2004020603.dmp)
  filesize=2GB log=/tmp/20040206.log
  
  該命令完全匯出全庫資料,匯出到多個檔案中每個檔案最大2GB,匯出過程記錄日誌

.
  
  說明:
  
  (1) 全庫匯出時,增量匯出類型預設為(complete)完全,所以例5 和例2匯出的結果

是完全一樣的.
  
  6. 命令列-累積匯出
  
  exp userid=cams/cams@cams full=y inctype=cumulative
  file=(/tmp/2004020601.dmp, /tmp/2004020602.dmp) filesize=2GB
  log=/tmp/20040206.log
  
  該命令累積匯出全庫資料,匯出到多個檔案中,每個檔案最大2GB,匯出過程記錄日

志.
  
  說明:
  
  (1) 如果選擇了增量匯出類型,則必需選擇full=y,即只能在全庫匯出模式下進行

完全累積或增量匯出.
  
  7. 命令列-增量匯出
  
  exp userid=cams/cams@cams full=y inctype=incremental
  file=(/tmp/2004020601.dmp, /tmp/2004020602.dmp) filesize=2GB
  log=/tmp/20040206.log
  
  該命令累積匯出全庫資料,匯出到多個檔案中,每個檔案最大2GB,匯出過程記錄日

志.

 

 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.