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

本文详细介绍了Oracle数据库的逻辑备份与恢复操作,包括如何导出和导入方案、表及其数据的具体命令。通过这些命令,用户可以实现不同级别的数据备份与恢复。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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(不需要写数据库实例,
会自动创建数据库实例)
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

弗兰随风小欢

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值