2010年3月16日 星期二

Oracle資料庫的匯出和匯入

匯出

1.將資料庫TEST匯出,帳號system 密碼manager 匯出到D:\daochu.dmp中
   exp system/manager@TEST file=d:\daochu.dmp full=y
2.將資料庫中system用戶與sys用戶的表匯出
   exp system/manager@TEST file=d:\daochu.dmp owner=(system,sys)
3.將資料庫中的表table1 、table2匯出
   exp system/manager@TEST file=d:\daochu.dmp tables=(table1,table2) 
4.將資料庫中的表table1中的字段filed1以"00"開頭的資料匯出
   exp system/manager@TEST file=d:\daochu.dmp tables=(table1) query=\" where filed1 
   like '00%'\"
 
  
匯入
1.將D:\daochu.dmp 中的數據匯入 TEST資料庫中。
   imp system/manager@TEST  file=d:\daochu.dmp
   如果table已存在,在後面加上 ignore=y 就可以了。
2.將d:\daochu.dmp中的表table1 匯入
   imp system/manager@TEST  file=d:\daochu.dmp  tables=(table1) 

沒有留言:

張貼留言