代码改变世界

Oracle数据库备份操作

2020-03-17 18:07  默默不语  阅读(482)  评论(0编辑  收藏  举报

1.以管理员身份登录

 

导出表

 2.exp system/Oracle11g buffer=64000 file=D:exp_full.dmp full=y;完全导出

 

 3.用户模式

exp scott/Oracle11g buffer=64000 file=D:scott_emp.dmp owner=scott

注意:命令末尾不能有分号,否则报错“scott为无效的用户名”。

 

 4.表模式

exp system/Oracle11g buffer=64000 file=D:exp_scott_emp.dmp tables=(scott.emp)

导入表

导入表与导出表命令类似,将exp改为imp。

5.完全导入

imp system/Oracle11g buffer=64000 file=D:exp_full.dmp full=y;

6.用户模式

imp scott/Oracle11g buffer=64000 file=D:scott_emp.dmp fromuser=scott touser=scott

7.表模式

imp system/Oracle11g buffer=64000 file=D:exp_scott_emp.dmp fromuser=scott touser=wangwu tables=(emp)