备份一个或多个用户
D:/>exp scott/tiger file=导出文件
D:/>exp system/manager owner=(用户1,用户2,…,用户n) file=导出文件
备份一个或多个表
D:/>exp 用户/密码 tables=表
D:/>exp 用户/密码 tables=(表1,…,表2)
D:/>exp system/manager tables=(用户.表)
D:/>exp system/manager tables=(用户1.表1,用户2.表2)
导入指定表
D:/>imp scott/tiger file=a.dmp
D:/>imp test/test fromuser=scott tables=emp file=a.dmp
D:/>imp test/test tables=dept file=a.dmp
说明:
如果导出用户没有DBA权限,则导入用户可以不用指定fromuser、touser参数
如果导出用户拥有DBA权限,则导入用户也必须拥有DBA权限
记录LOG信息
imp80 username/password@alias file=impfile.dmp log=mylog.log
exp80 username/password@alias file=expfile.dmp log=mylog.log
运行后,mylog.log里记录着所有的LOG信息