1、整庫
導出:
打開cmd命令行
EXP system/password full=y
或者指定導出文件名:
EXP system/password full=y file=data.dmp
導入:
IMP system/password full=y
此命令如果不指定file參數,則默認用備份文件 EXPDAT.DMP進行導入
如果指定file參數,則按照file指定的備份文件進行恢復
IMP system/password full=y file=data.dmp
2、按用戶:
導出:
exp system/password owner=usertest file=usertest.dmp
導入:
exp system/password owner=usertest file=usertest.dmp fromuser=usertest
3、按表:
導出:
--多個表用逗號分開,此處用戶爲表所有者用戶
exp usertest/usertest file=a.dmp tables=students,scores
導入:
--導入單個表
imp usertest/usertest file=a.dmp tables=students
--也可導入多個表,用逗號分隔
imp usertest/usertest file=a.dmp tables=students,scores