免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1652 | 回复: 0
打印 上一主题 下一主题

通过RMAN全库备份仅恢复指定表空间 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2011-12-19 13:56 |只看该作者 |倒序浏览
场景:
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;
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP