RMAN备份与恢复之不完全恢复
2015-10-15 14:49
288 查看
要点:对于RMAN的不完全恢复,有如下步骤:
1)加载数据到mount状态(建议恢复前先做备份)
2)为高并发分配多个通道
3)还原所有(所需)的数据文件
4)使用until time,until sequence,until scn来恢复数据库
5)使用resetlogs打开数据库
6)全备数据库
2.4切换数据库状态,重新恢复
另:rman debug trace 诊 rman问题
rman target / debug trace=/tmp/rman_debug
1)加载数据到mount状态(建议恢复前先做备份)
2)为高并发分配多个通道
3)还原所有(所需)的数据文件
4)使用until time,until sequence,until scn来恢复数据库
5)使用resetlogs打开数据库
6)全备数据库
RMAN> startup nomount force; Oracle instance started Total System Global Area 1937457152 bytes Fixed Size 2229584 bytes Variable Size 1241516720 bytes Database Buffers 687865856 bytes Redo Buffers 5844992 bytes RMAN> alter database mount; database mounted RMAN> run{ 2> allocate channel ch1 type disk; 3> allocate channel ch2 type disk; 4> set until time "to_date('2015-10-15 14:12:10','yyyy-mm-dd hh24:mi:ss')"; 5> restore database; 6> recover database; 7> alter database open resetlogs; 8> release channel ch1; 9> release channel ch2;} allocated channel: ch1 channel ch1: SID=129 device type=DISK allocated channel: ch2 channel ch2: SID=193 device type=DISK executing command: SET until clause Starting restore at 15-OCT-15 channel ch1: starting datafile backup set restore channel ch1: specifying datafile(s) to restore from backup set channel ch1: restoring datafile 00002 to /data2/orcl/sysaux01.dbf channel ch1: restoring datafile 00004 to /data2/orcl/user01.dbf channel ch1: reading from backup piece /u01/app/oracle/fast_recovery_area/ORCL/backupset/2015_10_15/o1_mf_nnndf_TAG20151015T141014_c1yjt962_.bkp channel ch2: starting datafile backup set restore channel ch2: specifying datafile(s) to restore from backup set channel ch2: restoring datafile 00001 to /data2/orcl/system01.dbf channel ch2: restoring datafile 00003 to /data2/orcl/undotbs01.dbf channel ch2: reading from backup piece /u01/app/oracle/fast_recovery_area/ORCL/backupset/2015_10_15/o1_mf_nnndf_TAG20151015T141014_c1yjt92v_.bkp channel ch1: piece handle=/u01/app/oracle/fast_recovery_area/ORCL/backupset/2015_10_15/o1_mf_nnndf_TAG20151015T141014_c1yjt962_.bkp tag=TAG20151015T141014 channel ch1: restored backup piece 1 channel ch1: restore complete, elapsed time: 00:00:45 channel ch2: piece handle=/u01/app/oracle/fast_recovery_area/ORCL/backupset/2015_10_15/o1_mf_nnndf_TAG20151015T141014_c1yjt92v_.bkp tag=TAG20151015T141014 channel ch2: restored backup piece 1 channel ch2: restore complete, elapsed time: 00:01:05 Finished restore at 15-OCT-15 Starting recover at 15-OCT-15 starting media recovery media recovery complete, elapsed time: 00:00:03 Finished recover at 15-OCT-15 database opened released channel: ch1 released channel: ch2 SQL> conn scott/Sina.2015@study Connected. SQL> select * from tb1; ID NAME ---------- ---------- 1 Test
2.4切换数据库状态,重新恢复
另:rman debug trace 诊 rman问题
rman target / debug trace=/tmp/rman_debug
相关文章推荐
- 使用Express搭建服务器
- UG NX 二次开发 转档图片
- 信息安全系统设计基础第6周学习总结
- Android 查看keystore SHA1并使用自定义keystore
- 如何在play框架的前端_通过Angularjs框架使用html模板
- 《平凡的世界》有感
- 浏览器判断及IE版本区分
- 138_多线程(多线程-同步函数的锁是this)
- 非阻塞Connect对于select时应注意问题
- android studio 导入 github 项目代码
- Android下怎么利用webView去调用JS里面的方法
- 解决tableViewCell分割线不到左边界的问题
- Linux 基础知识: GPT分区基础知识及如何在GPT分区上安装WIN7
- Google 的GSON使用详解
- 在Eclipse中搭建jBPM6.2运行环境及插件方法
- python爬虫小项目之计算研究生成绩绩点
- android:layout_weight的真实含义
- linux 下 postgres 的使用总结
- Socket编程中,阻塞与非阻塞的区别
- onvif-1