oracle 導入導出

oracle下導出某用戶所有表的方法
 
scott/tiger是用戶名和密碼,orcl是導出的實例名 
 按用戶方式導出數據(owner當中寫的是用戶名) exp scott/tiger@orcl file=scott_back owner=scott 
 按表方式導出數據(talbes當中寫的是全部表的名稱) exp scott/tiger@orcl tables=(emp, dept) file=scott_back_tab 
 按表空間方式導出數據(tablespaces當中寫的是表空間名稱) exp system/orcl@orcl tablespaces=(users) file=tbs_users 
 使用參數文件導出數據 exp system/handson parfile='C:\parameters.txt 
1、cmd->exp->username/passwd@sid-->.....一路回車--->輸入導出庫得名字 就把所有的表、視圖、存儲過程、函數、作業等亂七八糟的都導出來了; 
 2、pl/sql-->工具---〉導出用戶對象 可以找到你要導的東東。  
兩者都可以的很方便! 
導出表: exp scott/tiger@mycon tables=(dept,emp) file=tab1.dmp  
導出用戶: exp system/manager@mycon owner=scott file=usr1.dmp  
導出數據庫: 
1.完全導出 exp system/manager@mycon full=y inctype=complete file=full1.dmp 
2.2.增量導出 exp system/manager@mycon full=y inctype=incremental file=inc1.dmp  
3.3.累積導出 exp system/manager@mycon full=y inctype=cumulative file=cum1.dmp 
4.導入表: imp system/manager@mycon file=c:\tab1.dmp tables=(dept,emp) touser=scott 
5.導入用戶: imp system/manager@mycon file=usr1.dmp fromuser=scott touser=scott  
導入數據庫: 
1.全庫導入 imp system/manager@mycon file=full1.dmp full=y  
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章