Oracle imp exp example
imp id/pw file=D:\work\0323\U1\U1.dmp commit=y full=y
exp id/pw@someSID file='D:\work\0323\U1\U2.dmp' direct=y statistics=none
from https://www.thinkinmd.com/post/2020/02/07/first-time-meet-oracle-exp-and-imp/
匯出

匯出特定幾個 Table 的指令(匯出參數可參考官方文件):
> exp UserName/Password@ServiceName file='ExportPath.dmp' log='ExportLog.log' direct=y statistics=none tables=(Table1, Table2,...)
- UserName:使用者名稱
- Password:密碼
- ServiceName:服務名稱
- ExportPath:匯出 dmp 檔路徑(資料)
- ExportLog:匯出 log 檔路徑
- Table1, Table2,…:多個 Table 名稱
以上需要自行依照需求替換值哦!
部份參數介紹
- file:如果沒有特別去搭配 filesize 參數的情況下,只會匯出一個 dmp 檔,反之則可以於 file 參數定義多個 dmp 檔名稱(依據所設定 filesize 去切割)
- log:記錄指令執行途中狀況
- direct:是否直接路徑匯出
- statistics:統計資訊
- tables:語法範本 schemaname.tablename:partition_name

匯入

匯入特定幾個 Table 的指令(匯入參數可參考官方文件):
> imp UserName/Password@ServiceName file='ImportPath.dmp' ignore=y full=y
- UserName:使用者名稱
- Password:密碼
- ServiceName:服務名稱
- ImportPath:欲被匯入的 dmp 檔(資料)
留言
張貼留言