Oracle数据库dmp文件导出,导入方式

(一)、整库导出,导入

进入用户
  su - 用户名
导出命令

[oracle@localhost /]$ exp  用户名/密码  file ="导出路径/xx.dmp" full=y;

导入命令

 [oracle@localhost /]$ imp  用户名/密码  file ="导入路径/xx.dmp" full=y;

(二)、按用户导出,导入

进入用户
   su - 用户名

导出命令
   
  [oracle@localhost /]$ exp 用户名/密码  file ="路径/xx.dmp"  owner =用户名

导入命令
  
  [oracle@localhost /]$ imp 用户名/密码  file="路径/xx.dmp"   fromuser =用户名  touser = 导入用户名

(三)、按表导出,导入

进入用户
  su -用户名 
导出命令

[oracle@localhost /]$ exp 用户名/密码 file ="路径/xx.dmp" tables=表名1,表名2

导入命令

[oracle@localhost /]$ imp 用户名/密码 file ="路径/xx.dmp" tables=表名1,表名2

Guess you like

Origin blog.csdn.net/weixin_48133875/article/details/121019461