本文主要是介绍Oracle RMAN 使用RMAN恢复INACTIVE状态的日志,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
恢复INACTIVE日志组有两种情况
- 一种是INACTIVE日志组的其中一个成员损坏
- 一种是INACTIVE日志组所有日志成员都损坏
- 使用rman恢复INACTIVE日志组的其中一个成员损坏
- 1、查看当前状态:
sys@TEST1107> select * from v$logfile;
GROUP# STATUS TYPE MEMBER IS_
---------- ------- ------- -------------------------------------------------- ---
3 ONLINE /u01/app/oracle/oradata/test1107/redo03.log NO
2 ONLINE /u01/app/oracle/oradata/test1107/redo02.log NO
1 ONLINE /u01/app/oracle/oradata/test1107/redo01.log NO
1 ONLINE /u01/app/oracle/oradata/test1107/redo01a.log NO
2 ONLINE /u01/app/oracle/oradata/test1107/redo02a.log NO
3 ONLINE /u01/app/oracle/oradata/test1107/redo03a.log NO
6 rows selected.
sys@TEST1107> alter system switch logfile;
System altered.
sys@TEST1107> select * from v$log;
GROUP# THREAD# SEQUENCE# BYTES BLOCKSIZE MEMBERS ARC STATUS FIRST_CHANGE# FIRST_TIME NEXT_CHANGE# NEXT_TIME
---------- ---------- ---------- ---------- ---------- ---------- --- ---------------- ------------- ------------------ ------------ ------------------
1 1 9 52428800 512 2 YES INACTIVE 1089973 06-NOV-13 1089979 06-NOV-13
2 1 11 52428800 512 2 NO CURRENT 1090048 06-NOV-13 2.8147E+14
3 1 10 52428800 512 2 YES ACTIVE 1089979 06-NOV-13 1090048 06-NOV-13
- 2、OS删除一个INACTIVE 状态的日志
[oracle@rtest ~]$ rm /u01/app/oracle/oradata/test1107/redo01.log
- 3、模拟断电,然后再启动实例,可以正常打开
sys@TEST1107> shutdown abort
ORACLE instance shut down.
sys@TEST1107> startup
ORACLE instance started.
Total System Global Area 1269366784 bytes
Fixed Size 2227984 bytes
Variable Size 805306608 bytes
Database Buffers 452984832 bytes
Redo Buffers 8847360 bytes
Database mounted.
Database opened.
- 4、查看日志组成员状态,发现刚删除那个日志组成员的状态为INVALID
sys@TEST1107> select * from v$logfile;
GROUP# STATUS TYPE MEMBER
这篇关于Oracle RMAN 使用RMAN恢复INACTIVE状态的日志的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!