1.今天我打算在navicat用語句導出oracle數據庫表。但是廢了很長時間,但是一直報錯
然后我在桌面新建一個文件1.dmp,再在D:\Oracle\product\11.2.0\dbhome_1\BIN打開了cmd,試了幾次,終於可以導出了
1.
exp scott/tiger@orcl file='C:\Users\lenovo\Desktop\1.dmp'
導出scott對象下的所有表。
2.導出一個表WEB
exp scott/tiger@orcl file='C:\Users\lenovo\Desktop\1.dmp' tables=WEB
3.導出多個表
exp scott/tiger@orcl file='C:\Users\lenovo\Desktop\1.dmp' tables=WEB,PATIENT,T_USER,RESULT
4.導出成sql文件
exp scott/tiger@orcl file='C:\Users\lenovo\Desktop\1.sql' tables=WEB,PATIENT,T_USER,RESULT
還可以導出成其他格式文件
exp scott/tiger@orcl file='C:\Users\lenovo\Desktop\1.txt' tables=WEB,PATIENT,T_USER,RESULT
5.導入數據庫
imp LIXIAOLONG/123456@orcl file='C:\Users\lenovo\Desktop\1.txt' tables=WEB,PATIENT,T_USER,RESULT