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