RMAN restore恢复带有OFFLINE文件的数据库
来源:互联网 发布:倒班表软件 编辑:程序博客网 时间:2024/05/17 01:38
现象:
在有OFFLINE数据文件的数据库中,执行RMAN备份(database + archivelog)后,恢复时需要单独处理OFFLINE的数据文件,否则recover database时将提示缺少(找不到)之前的某个归档日志。
处理办法如下:
1、重建控制文件:把OFFLINE的数据文件去掉
参考:http://blog.csdn.net/lk_db/article/details/52576220
2、跳过OFFLINE的数据文件所在的表空间(该表空间包含多个数据文件的话,可能丢失数据较多),多用于OFFLINE所在的表空间仅有一个数据文件的情况。select ts.ts#,ts.name from v$tablespace ts,v$datafile df where df.ts#=ts.ts# and df.file#=5;
RMAN> recover database skip tablespace 'TEST';
Starting recover at 13-JUN-16
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=20 device type=DISK
Executing: alter database datafile 5 offline
starting media recovery
archived log for thread 1 with sequence 17 is already on disk as file /u01/app/oracle/oradata/orcl/redo02.log
archived log for thread 1 with sequence 18 is already on disk as file /u01/app/oracle/oradata/orcl/redo01.log
archived log for thread 1 with sequence 19 is already on disk as file /u01/app/oracle/oradata/orcl/redo03.log
archived log file name=/u01/app/oracle/archivelog/1_8_914429606.dbf thread=1 sequence=8
archived log file name=/u01/app/oracle/archivelog/1_9_914429606.dbf thread=1 sequence=9
archived log file name=/u01/app/oracle/archivelog/1_10_914429606.dbf thread=1 sequence=10
archived log file name=/u01/app/oracle/archivelog/1_11_914429606.dbf thread=1 sequence=11
archived log file name=/u01/app/oracle/archivelog/1_12_914429606.dbf thread=1 sequence=12
archived log file name=/u01/app/oracle/archivelog/1_13_914429606.dbf thread=1 sequence=13
archived log file name=/u01/app/oracle/archivelog/1_14_914429606.dbf thread=1 sequence=14
archived log file name=/u01/app/oracle/archivelog/1_15_914429606.dbf thread=1 sequence=15
archived log file name=/u01/app/oracle/archivelog/1_16_914429606.dbf thread=1 sequence=16
archived log file name=/u01/app/oracle/oradata/orcl/redo02.log thread=1 sequence=17
archived log file name=/u01/app/oracle/oradata/orcl/redo01.log thread=1 sequence=18
archived log file name=/u01/app/oracle/oradata/orcl/redo03.log thread=1 sequence=19
media recovery complete, elapsed time: 00:00:01
Finished recover at 13-JUN-16
SQL> alter database open resetlogs;
Database altered.
SKIPTABLESPACE解释:
Use an optional SKIPTABLESPACE 'tablespace_name' argument to
avoid restoring specified tablespaces, which is useful when you want to
avoid restoring tablespaces containing temporary data.
If you specify SKIP FOREVER TABLESPACE, then RMAN specifies the DROP
option of ALTER DATABASE DATAFILE ... OFFLINE when taking the
datafiles that belong to the tablespace offline before the restore. The DROP
option indicates that RMAN does not intend to recover these files and
intends to drop their tablespaces from the database after the database is
opened again. In other words, FOREVER indicates that RMAN never
intends to do anything with the skipped tablespaces again.
0 0
- RMAN restore恢复带有OFFLINE文件的数据库
- Oracle RMAN恢复带有OFFLINE数据文件的数据库
- rman restore:在备份中恢复丢失的文件
- RMAN恢复复制数据库报错RMAN-06054的分析
- 使用RMAN恢复完全损坏的数据库
- 9i数据库的RMAN备份恢复
- RMAN 各种文件的恢复方法
- rman自动控制文件备份的恢复
- RMAN恢复数据库
- 使用RMAN恢复数据库
- Rman 恢复数据库
- rman恢复Oracle数据库
- rman恢复数据库一
- rman恢复数据库二
- RMAN快速恢复数据库
- 恢复(RESTORE)DB2数据库
- DB2的备份和恢复(RESTORE)数据库方法
- DB2的备份(backup)和恢复(RESTORE)数据库方法
- iOS音频播放、录音、视频播放、拍照、视频录制
- springMVC与struts2的区别:
- 输入年份显示十二生肖
- 飛飛(六十六)文件的结果输出
- JSON的基础知识
- RMAN restore恢复带有OFFLINE文件的数据库
- Scrapy Selector 语法
- leetcode经典解法
- python多重继承 MRO
- java多线程:循环输出ABC
- 深入理解java范型
- Swift UIButton、UILabel、UITextField的创建与用法
- LeetCode-258 Add Digits
- Android开发笔记之音乐播放器