删除inactive日志组,重启数据库后恢复

----- 当前日志组状态
  1. SQL> select group#,members,status from v$log;

  2.     GROUP# MEMBERS STATUS
  3. ---------- ---------- ----------------
  4.          1 1 CURRENT
  5.          2 1 INACTIVE
  6.          3 1 INACTIVE
  7. SQL> select group#,member from v$logfile order by 1;

  8.     GROUP#
  9. ----------
  10. MEMBER
  11. --------------------------------------------------------------------------------
  12.          1
  13. /u01/app/oracle/oradata/HU/redo01.log

  14.          2
  15. /u01/app/oracle/oradata/HU/redo02.log

  16.          3
  17. /u01/app/oracle/oradata/HU/redo03.log


  18. SQL>
-----删除第二组日志
  1. SQL> !rm /u01/app/oracle/oradata/HU/redo02.log

  2. SQL> !ls /u01/app/oracle/oradata/HU/*.log
  3. /u01/app/oracle/oradata/HU/redo01.log /u01/app/oracle/oradata/HU/redo03.log

  4. SQL>



----- 重启数据库
  1. SQL> shutdown immediate
  2. Database closed.
  3. Database dismounted.
  4. ORACLE instance shut down.
  5. SQL> startup
  6. ORACLE instance started.

  7. Total System Global Area 830930944 bytes
  8. Fixed Size 2257800 bytes
  9. Variable Size 536874104 bytes
  10. Database Buffers 289406976 bytes
  11. Redo Buffers 2392064 bytes
  12. Database mounted.
  13. ORA-03113: end-of-file on communication channel
  14. Process ID: 13901
  15. Session ID: 1 Serial number: 5


  16. SQL>


---- 查看alert日志
  1. Errors in file /u01/app/oracle/diag/rdbms/hu/HU/trace/HU_lgwr_13857.trc:
  2. ORA-00313: open failed for members of log group 2 of thread 1
  3. ORA-00312: online log 2 thread 1: '/u01/app/oracle/oradata/HU/redo02.log'
  4. ORA-27037: unable to obtain file status
  5. Linux-x86_64 Error: 2: No such file or directory


---- 对2号日志组执行cleat操作,oper数据库
  1. SQL> conn / as sysdba
  2. Connected to an idle instance.
  3. SQL> startup mount
  4. ORACLE instance started.

  5. Total System Global Area 830930944 bytes
  6. Fixed Size 2257800 bytes
  7. Variable Size 536874104 bytes
  8. Database Buffers 289406976 bytes
  9. Redo Buffers 2392064 bytes
  10. Database mounted.
  11. SQL> alter database clear logfile group 2;

  12. Database altered.

  13. SQL> alter database open;

  14. Database altered.

  15. SQL>


---- 查看日志组状态
  1. SQL> select group#,members,status from v$log;

  2.     GROUP# MEMBERS STATUS
  3. ---------- ---------- ----------------
  4.          1 1 CURRENT
  5.          2 1 UNUSED
  6.          3 1 INACTIVE

  7. SQL> !ls /u01/app/oracle/oradata/HU/*.log
  8. /u01/app/oracle/oradata/HU/redo01.log /u01/app/oracle/oradata/HU/redo03.log
  9. /u01/app/oracle/oradata/HU/redo02.log

  10. SQL>

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/31399171/viewspace-2138621/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/31399171/viewspace-2138621/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值