數據庫命令導出:
將數據庫ORCL完全導出,用戶名system 密碼manager 導出到D:\daochu.dmp中
exp system/system@ORCL file=d:\backup.dmp full=y log=d:\backup.log
將數據庫中sltc用戶與sxks用戶的表導出
exp system/system@ORCL file=d:\backup.dmp owner=(sltc,sxks) log=d:\backup.log
將數據庫中的表table1 、table2導出
exp system/system@ORCL file=d:\backup.dmp tables=(table1,table2) log=d:\backup.log
將數據庫中的表table中的字段filed以"133"打頭的數據導出
exp system/system@ORCL file=d:\backup.dmp tables=(table) query=\" where filed1 like '133%'\" log=d:\backup.log
數據庫備份文件是否壓縮compress屬性,默認備份文件壓縮compress=y
數據庫命令導入:
將D:\backup.dmp 中的數據導入 TEST數據庫中,ignore=y已有表不報錯.
imp system/system@ORCL file=d:\backup.dmp ignore=y
將d:\backup.dmp中的表table1 導入
imp system/system@ORCL file=d:\backup.dmp tables=(table1)
不同名之間的數據導入:
imp system/system@ORCL fromuser=sxks touser=sltc file=d:\backup.dmp log=d:\backup.log
不是本機的數據導入:
imp user/aa123@//10.100.20.19:1521/ORCL file=d:\data-20110610-011001.dmp full=y buffer=10240000 ignore=y statistics=none