1. 程式人生 > >dmp檔案匯入匯出(2)

dmp檔案匯入匯出(2)

匯出的使用者為TEST_2018,匯入到另一個庫的新使用者中

  • expdp匯出表以及impdp匯入,裸表只有資料的遷移不包含物件的遷移:

匯出的是scott使用者下的base_data表和case8_all表的資料,匯出的路徑是export_dmp,生成的dmp檔案是base_data.dmp,形成的log檔案是:expdp TESTUSER/[email protected]:1521/orcl directory=EXPORT dumpfile=1520.dmp tables=testuser.base_data,testuser.case8_all logfile=1520.log

匯入的方式,使用一個具有dba許可權的使用者或者有系統許可權的使用者來進行匯入都可以,刪除TESTUSER下的base_data表和case8_all表,相當於原路倒回去,語句如下:impdp TESTUSER/

[email protected]:1521/orcl directory=IMPORT dumpfile=1520.dmp tables=testuser.base_data,testuser.case8_all

(在表的遷移過程中沒有找到remap_shema的使用者)

  • expdp匯出模式以及impdp匯入

匯出:expdp TESTUSER/[email protected]:1521/orcl directory=EXPORT dumpfile=1651.dmp schemas=testuser logfile=1651.log 匯入testuser:new_testuser使用者是不存在的,直接可以建立:impdp TESTUSER/

[email protected]:1521/orcl directory=IMPORT dumpfile=1651.dmp schemas=testuser remap_schema=testuser:new_testuser

  • expdp匯出多個模式以及impdp匯入

未進行

  • expdp匯出整庫以及impdp匯入

未進行