-----
当前日志组状态
-----删除第二组日志
----- 重启数据库
---- 查看alert日志
---- 对2号日志组执行cleat操作,oper数据库
---- 查看日志组状态
- SQL> select group#,members,status from v$log;
-
- GROUP# MEMBERS STATUS
- ---------- ---------- ----------------
- 1 1 CURRENT
- 2 1 INACTIVE
- 3 1 INACTIVE
- SQL> select group#,member from v$logfile order by 1;
-
- GROUP#
- ----------
- MEMBER
- --------------------------------------------------------------------------------
- 1
- /u01/app/oracle/oradata/HU/redo01.log
-
- 2
- /u01/app/oracle/oradata/HU/redo02.log
-
- 3
- /u01/app/oracle/oradata/HU/redo03.log
-
-
- SQL>
- SQL> !rm /u01/app/oracle/oradata/HU/redo02.log
-
- SQL> !ls /u01/app/oracle/oradata/HU/*.log
- /u01/app/oracle/oradata/HU/redo01.log /u01/app/oracle/oradata/HU/redo03.log
-
- SQL>
----- 重启数据库
- SQL> shutdown immediate
- Database closed.
- Database dismounted.
- ORACLE instance shut down.
- SQL> startup
- ORACLE instance started.
-
- Total System Global Area 830930944 bytes
- Fixed Size 2257800 bytes
- Variable Size 536874104 bytes
- Database Buffers 289406976 bytes
- Redo Buffers 2392064 bytes
- Database mounted.
- ORA-03113: end-of-file on communication channel
- Process ID: 13901
- Session ID: 1 Serial number: 5
-
-
- SQL>
---- 查看alert日志
- Errors in file /u01/app/oracle/diag/rdbms/hu/HU/trace/HU_lgwr_13857.trc:
- ORA-00313: open failed for members of log group 2 of thread 1
- ORA-00312: online log 2 thread 1: '/u01/app/oracle/oradata/HU/redo02.log'
- ORA-27037: unable to obtain file status
- Linux-x86_64 Error: 2: No such file or directory
---- 对2号日志组执行cleat操作,oper数据库
- SQL> conn / as sysdba
- Connected to an idle instance.
- SQL> startup mount
- ORACLE instance started.
-
- Total System Global Area 830930944 bytes
- Fixed Size 2257800 bytes
- Variable Size 536874104 bytes
- Database Buffers 289406976 bytes
- Redo Buffers 2392064 bytes
- Database mounted.
- SQL> alter database clear logfile group 2;
-
- Database altered.
-
- SQL> alter database open;
-
- Database altered.
-
- SQL>
---- 查看日志组状态
- SQL> select group#,members,status from v$log;
-
- GROUP# MEMBERS STATUS
- ---------- ---------- ----------------
- 1 1 CURRENT
- 2 1 UNUSED
- 3 1 INACTIVE
-
- SQL> !ls /u01/app/oracle/oradata/HU/*.log
- /u01/app/oracle/oradata/HU/redo01.log /u01/app/oracle/oradata/HU/redo03.log
- /u01/app/oracle/oradata/HU/redo02.log
-
- SQL>
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/31399171/viewspace-2138621/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/31399171/viewspace-2138621/