分享
 
 
 

Oracle数据库不完全恢复实例

王朝oracle·作者佚名  2008-05-31
窄屏简体版  字體: |||超大  

1、 环境:操作系统aix5.2,数据库Oracle9.2

2、 模拟环境:

1)首先使用rman作整个数据库备份

2)时间:

# date

Tue Aug 23 17:35:19 BEIDT 2005

3)操作:

sql>truncate table scott.emp

3、 恢复数据库到2005年8月23日17点35分19秒

4、 数据库到mount状态

5、 设置变量

$set nls_date_format=yyyy-mm-dd:hh24:mi:ss

6、 连接到rman

$rman target / catalog rman/rman@omsora9

RMAN> run {

2> set until time="to_date('2005-08-23:17:35:19','yyyy-mm-dd:hh24:mi:ss')";

3> restore database;

4> recover database;

5> }

executing command: SET until clause

Starting restore at 23-AUG-05

allocated channel: ORA_DISK_1

channel ORA_DISK_1: sid=14 devtype=DISK

allocated channel: ORA_DISK_2

channel ORA_DISK_2: sid=15 devtype=DISK

allocated channel: ORA_DISK_3

channel ORA_DISK_3: sid=16 devtype=DISK

allocated channel: ORA_DISK_4

channel ORA_DISK_4: sid=17 devtype=DISK

channel ORA_DISK_1: starting datafile backupset restore

channel ORA_DISK_1: specifying datafile(s) to restore from backup set

restoring datafile 00003 to /oradata/hb130000/cwmlite01.dbf

restoring datafile 00010 to /oradata/hb130000/xdb01.dbf

restoring datafile 00012 to /oradata/hb130000/GFB.DBF

restoring datafile 00013 to /oradata/hb130000/CA.dbf

restoring datafile 00017 to /oradata/hb130000/GDSS.dbf

channel ORA_DISK_2: starting datafile backupset restore

channel ORA_DISK_2: specifying datafile(s) to restore from backup set

restoring datafile 00004 to /oradata/hb130000/drsys01.dbf

restoring datafile 00005 to /oradata/hb130000/example01.dbf

restoring datafile 00006 to /oradata/hb130000/indx01.dbf

restoring datafile 00014 to /oradata/hb130000/QUEST.dbf

restoring datafile 00018 to /oradata/hb130000/FPJKDB.dbf

channel ORA_DISK_3: starting datafile backupset restore

channel ORA_DISK_3: specifying datafile(s) to restore from backup set

restoring datafile 00002 to /oradata/hb130000/undotbs01.dbf

restoring datafile 00007 to /oradata/hb130000/odm01.dbf

restoring datafile 00009 to /oradata/hb130000/users01.dbf

restoring datafile 00011 to /oradata/hb130000/YSZX130000002005.DBF

restoring datafile 00015 to /oradata/hb130000/FOGLIGHT.dbf

channel ORA_DISK_4: starting datafile backupset restore

channel ORA_DISK_4: specifying datafile(s) to restore from backup set

restoring datafile 00001 to /oradata/hb130000/system01.dbf

restoring datafile 00008 to /oradata/hb130000/tools01.dbf

restoring datafile 00016 to /oradata/hb130000/gwd.dbf

restoring datafile 00019 to /oradata/hb130000/tgggg.dbf

channel ORA_DISK_2: restored backup piece 1

piece handle=/oradata/rmanbackup/df_HB130000_567080235_66_1.bak tag=TAG20050823T

101715 params=NULL

channel ORA_DISK_2: restore complete

channel ORA_DISK_3: restored backup piece 1

piece handle=/oradata/rmanbackup/df_HB130000_567080235_67_1.bak tag=TAG20050823T

101715 params=NULL

channel ORA_DISK_3: restore complete

channel ORA_DISK_1: restored backup piece 1

piece handle=/oradata/rmanbackup/df_HB130000_567080236_68_1.bak tag=TAG20050823T

101715 params=NULL

channel ORA_DISK_1: restore complete

channel ORA_DISK_4: restored backup piece 1

piece handle=/oradata/rmanbackup/df_HB130000_567080237_69_1.bak tag=TAG20050823T

101715 params=NULL

channel ORA_DISK_4: restore complete

Finished restore at 23-AUG-05

Starting recover at 23-AUG-05

using channel ORA_DISK_1

using channel ORA_DISK_2

using channel ORA_DISK_3

using channel ORA_DISK_4

starting media recovery

archive log thread 1 sequence 4 is already on disk as file /oradata/rmanbackup/a

rchive/hb130000_1_4.dbf

channel ORA_DISK_1: starting archive log restore to default destination

channel ORA_DISK_1: restoring archive log

archive log thread=1 sequence=3

channel ORA_DISK_1: restored backup piece 1

piece handle=/oradata/rmanbackup/df_HB130000_567080296_72_1.bak tag=TAG20050823T

101815 params=NULL

channel ORA_DISK_1: restore complete

archive log filename=/oradata/rmanbackup/archive/hb130000_1_3.dbf thread=1 seque

nce=3

media recovery complete

Finished recover at 23-AUG-05

RMAN>

7、 连接到数据库

$sqlplus nolog

sql>conn / as sysdba

connected

sql>alter database open resetlogs

database altered.

8、查询表scott.emp数据得到恢复。

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
2023年上半年GDP全球前十五强
 百态   2023-10-24
美众议院议长启动对拜登的弹劾调查
 百态   2023-09-13
上海、济南、武汉等多地出现不明坠落物
 探索   2023-09-06
印度或要将国名改为“巴拉特”
 百态   2023-09-06
男子为女友送行,买票不登机被捕
 百态   2023-08-20
手机地震预警功能怎么开?
 干货   2023-08-06
女子4年卖2套房花700多万做美容:不但没变美脸,面部还出现变形
 百态   2023-08-04
住户一楼被水淹 还冲来8头猪
 百态   2023-07-31
女子体内爬出大量瓜子状活虫
 百态   2023-07-25
地球连续35年收到神秘规律性信号,网友:不要回答!
 探索   2023-07-21
全球镓价格本周大涨27%
 探索   2023-07-09
钱都流向了那些不缺钱的人,苦都留给了能吃苦的人
 探索   2023-07-02
倩女手游刀客魅者强控制(强混乱强眩晕强睡眠)和对应控制抗性的关系
 百态   2020-08-20
美国5月9日最新疫情:美国确诊人数突破131万
 百态   2020-05-09
荷兰政府宣布将集体辞职
 干货   2020-04-30
倩女幽魂手游师徒任务情义春秋猜成语答案逍遥观:鹏程万里
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案神机营:射石饮羽
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案昆仑山:拔刀相助
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案天工阁:鬼斧神工
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案丝路古道:单枪匹马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:与虎谋皮
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:李代桃僵
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:指鹿为马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:小鸟依人
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:千金买邻
 干货   2019-11-12
 
推荐阅读
 
 
 
>>返回首頁<<
 
靜靜地坐在廢墟上,四周的荒凉一望無際,忽然覺得,淒涼也很美
© 2005- 王朝網路 版權所有