1、oracle導出
exp 用戶名/密碼@數據庫ip/數據庫sid file=“文件路徑及文件名” log =“文件路徑及文件名” [full=y] [owner="aaa"] [tables=(table)];
1.將數據庫orcl完全導出(完全導出)
exp aaa/[email protected]/orcl file=d:/daochu.dmp log=d:/daochu.txt full=y;
2.將數據庫用戶aaa的表導出(用戶模式)
exp aaa/[email protected]/orcl owner='aaa' file=d:/daochu1.dmp log=d:/daochu1.txt;
3.將數據庫的表table1導出(表模式)
exp aaa/[email protected]/orcl owner='aaa' file=d:/daochu2.dmp log=d:/daochu2.txt tables=(table1)
2、oracle導入
imp 用戶名/密碼@數據庫ip/數據庫實例 file = '文件路徑和文件名' [full=y] [fromuser =aaa] [touser=aaa] [owner=aaa][ables=(表名)]
1.將備份文件daochu.dmp完全導入到數據庫(完全導入)
imp aaa/[email protected]/orcl file=d:/daochu.dmp full=y;
2.把備份文件daochu1.dmp備份到數據庫(用戶模式)
imp aaa/[email protected]/orcl file=d:/daochu1.dmp fromuser=aaa touser = aaa;
3.將備份文件daochu2.dmp中的表導入數據庫(表模式)
imp aaa/[email protected]/orcl owner=aaa file=d:/daochu2.dmp tables=(table1) ;
注:
1、[]內內容可以省略;
2、full = y 導出或導入一個完整的數據庫
3、fromuser 入一個或一組指定用戶所屬的全部表、索引和其他對象
4、touser 將一個用戶所屬的數據導入另一個用戶
5、[tables=(table)] 導入或導出表
6、exp owner=user 將用戶user的對象導出 imp owner=user 把用戶user的對象導入
oracle導入、導出
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.