Chinaunix首页 | 论坛 | 博客
  • 博客访问: 687730
  • 博文数量: 147
  • 博客积分: 5347
  • 博客等级: 大校
  • 技术积分: 1453
  • 用 户 组: 普通用户
  • 注册时间: 2005-06-06 11:11
文章分类

全部博文(147)

文章存档

2014年(4)

2012年(9)

2011年(5)

2010年(28)

2009年(21)

2008年(29)

2007年(15)

2006年(17)

2005年(19)

我的朋友

分类: Oracle

2011-01-18 13:20:41

场景:
1、现有一个RMAN全备份,备份很大,但只想恢复此备份中的某张表;如何快速恢复?
思路:
只恢复系统表空间(SYSTEM/SYSAUX/UNDOTBS,此三个必须恢复)和表所在的表空间,其他表空间都忽略。
2、 恢复数据库, 重定向恢复数据文件
 
方法:
1、 rman target / ----startup mount;
 
2、 restore controlfile from '/xxx/xxctl.bak'
 
3、alter database mount;
 
4、 restore database skip forever tablespace TBS_EA_BUSI,TBS_EA_BUSI_IDX,TBS_EA_CGYW,TBS_EA_CGYW_HIST,TBS_EA_CGYW_HIST_IDX,....;
 
5、recover database skip forever tablespace TBS_EA_BUSI,TBS_EA_BUSI_IDX,TBS_EA_CGYW,TBS_EA_CGYW_HIST,TBS_EA_CGYW_HIST_IDX,....;
 
6、alter database datafile 5     offline;
alter database datafile 6     offline;
alter database datafile 7     offline;
alter database datafile 8     offline; 9\10\11.......
 
7、alter database open resetlogs;
-----------------
重定向恢复数据库文件:
1\ restore controlfile from 'D:\rman\leiji\TEST_CONTROLFILE_LEIJI_1_1210_1_740237494';
2\
run{
allocate channel t1 type disk;
allocate channel t2 type disk;
allocate channel t3 type disk;
set newname for datafile 'D:\oracle\oradata\rzxinyi\UNDOTBS01.DBF' to 'd:\untotbs.dbf'; ------datafile 2
 restore  database;
release channel t1;
release channel t2;
release channel t3;
}
3\ switch datafile  2 to copy;
4\ recover database;
    recover database until sequence...
5\ alter database open resetlog;
阅读(7639) | 评论(1) | 转发(0) |
给主人留下些什么吧!~~

ming2700045402015-06-18 11:00:19