標籤:
1、資料匯出:
1 將資料庫TEST完全匯出,使用者名稱system 密碼manager 匯出到D:\daochu.dmp中
exp system/[email protected] file=d:\daochu.dmp full=y
2 將
資料庫中system使用者與sys使用者的表匯出
exp system/[email protected] file=d:\daochu.dmp owner=(system,sys)
3 將資料庫中的表table1 、table2匯出
exp system/[email protected] file=d:\daochu.dmp tables=(table1,table2)
4 將資料庫中的表table1中的欄位filed1以"00"打頭的資料匯出
exp system/[email protected] file=d:\daochu.dmp tables=(table1) query=\" where filed1 like ‘00%‘\"
上面是常用的匯出,對於壓縮我不太在意,用winzip把dmp檔案可以很好的壓縮。
不過在上面命令後面 加上 compress=y 就可以了
Note:匯出中會提示:exp-000091:正在匯出有問題的統計資訊,不影響imp,可以用statistics=none去掉提示資訊。2、資料匯入 1 將D:\daochu.dmp 中的資料匯入 TEST資料庫中。 imp system/[email protected] full=y file=d:\daochu.dmp ignore=y log=E:\txt.txt(則是列印log) 上面可能有點問題,因為有的表已經存在,然後它就報錯,對該表就不進行匯入。 在後面加上 ignore=y 就可以了。 2 將d:\daochu.dmp中的表table1 匯入 imp system/[email protected] file=d:\daochu.dmp tables=(table1) 3、將一個使用者下所有表倒入到另外一個使用者下 imp system/[email protected] file=d:daochu.dmp fromuser=bpo touser=tpo4、倒入到一個表imp system/manager file=tank log=tank fromuser=seapark TABLES=(a,b) 基本上上面的匯入匯出夠用了。不少情況是將表徹底刪除,然後匯入。 注意: 你要有足夠的許可權,許可權不夠它會提示你。 資料庫時可以連上的。可以用tnsping TEST 來獲得資料庫TEST能否連上。
oracle 資料匯入匯出命令