您的位置:首页 > 数据库 > Oracle

oracle数据库的逻辑备份与恢复(二)

2017-09-24 19:47 337 查看
oracle数据库的逻辑备份与恢复(二)

导出方案:
a)导出自己的方案:

如:exp scott/tiger@orcl owner=scott file d:\scott.dmp

b)导出其他方案(级别一定要大于等于导出那个表的级别)

如:exp system/manager@orcl owner=(system,scott) file=d:\system.dmp

这样就导出了system方案 scott方案

c)导出数据库(要求该用户具有dba的权限或者exp_full_database的权限)

如:exp userid=system/manager@orcl full=y inctype=complete file=d:\xxx.dmp

导入表:

a)导入自己表:

如:imp userid=scott/tiger@orcl tables=(emp) file=d:\xx.dmp

b)导入表的结构:

要求该用户具有dba的权限,或是imp_full_database

如:imp userid=system/manager@orcl tables=(emp) file=d:\xx.dmp touser=scott

c)导入表的结构:

imp userid=scott/tiger@orcl tables=(emp) file=d:\xx.dmp rows=n

d)导入数据:

如果对象已经存在可以只导入表的数据

如:imp userid=scott/tiger@orcl tables(emp) file d:\\xx.dmp ignore=y

导入方案:

a)导入自身的方案

如:imp userid=scott/tiger file=d:\xxx.dmp

b)导入其它方案

如:要求该用户具有dba的权限

imp userid=system/manager file=d:\xxx.dmp fromuser=system touser=scott

c)导出数据库

imp userid=system/manager full=y file=d:\xxx.dmp(不需要写数据库实例,

会自动创建数据库实例)
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: