首页 > 代码库 > 【练习---日志恢复】正常关库删除一组当前日志组
【练习---日志恢复】正常关库删除一组当前日志组
1.查询当前日志组及状态:
10:45:14 SYS@ORA11GR2>select group#,member from v$logfile;
GROUP# MEMBER
---------- --------------------------------------------------
3 /u01/app/oracle/oradata/ORA11GR2/redo03.log
2 /u01/app/oracle/oradata/ORA11GR2/redo02.log
1 /u01/app/oracle/oradata/ORA11GR2/redo01.log
3 /u01/app/oracle/disk/redo03b.log
2 /u01/app/oracle/disk/redo02b.log
1 /u01/app/oracle/disk/redo01b.log
6 rows selected.
10:45:26 SYS@ORA11GR2>select group#,members,bytes/1024/1024 M,status from v$log;
GROUP# MEMBERS M STATUS
---------- ---------- ---------- ----------------
1 2 50 CURRENT
2 2 50 INACTIVE
3 2 50 ACTIVE
2.模拟故障(正常关库删除一组当前日志组):
10:45:53 SYS@ORA11GR2>shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
[oracle@host03 ~]$ rm /u01/app/oracle/oradata/ORA11GR2/redo01.log
[oracle@host03 ~]$ rm /u01/app/oracle/disk/redo01b.log
3.起库报错,查看alert日志:
ORA-00313: open failed for members of log group 1 of thread 1
ORA-00312: online log 1 thread 1: ‘/u01/app/oracle/disk/redo01b.log‘
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
ORA-00312: online log 1 thread 1: ‘/u01/app/oracle/oradata/ORA11GR2/redo01.log‘
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
4.解决:将数据库起到mount
10:50:09 SYS@ORA11GR2>alter database clear logfile group 1;
Database altered.
10:51:35 SYS@ORA11GR2>select group#,members,bytes/1024/1024 M,status from v$log;
GROUP# MEMBERS M STATUS
---------- ---------- ---------- ----------------
1 2 50 UNUSED
3 2 50 INACTIVE
2 2 50 CURRENT
10:51:41 SYS@ORA11GR2>alter database open;
Database altered.
【练习---日志恢复】正常关库删除一组当前日志组
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。