Oracle:exp/imp 导出导入(文件格式为dmp文件)
1.使用exp导出(命令窗口cmd):
(1)完全导出:
exp 用户/密码@数据库地址 file=文件导出路径 full=y (compress=y)
(2)用户导出:
exp 用户/密码@数据库地址 file=文件导出路径 owner=(用户,用户下的表)
(3)表模式导出:
exp 用户/密码@数据库地址 file=文件导出路径 table=(需要导出的表)
2.使用imp导入:
(1)完全导入:
imp 用户/密码@数据库地址 file=文件导出路径 full=y ignore=y
(2)用户导入:
imp 用户/密码@数据库地址 file=文件导出路径 fromuser=用户 touser=用户
(必须指定fromuser、touser参数,才能导入数据)
(3)表模式导入:
imp 用户/密码@数据库地址 file=文件导出路径
注意:imp表模式导入前,要将用户拥有的对象删除,或者加ingnore=y