----#非当前日志组的所有成员丢失(在正常关库下)
---查询日志组的状态
-
SQL> select group#,status from v$log;
-
-
GROUP# STATUS
-
---------- ----------------
-
1 INACTIVE
-
2 INACTIVE
-
3 CURRENT
---查询日志组的地址
-
SQL> select group#,member from v$logfile;
-
-
GROUP# MEMBER
-
---------- ---------------------------------------------
-
3 /u01/app/oracle/oradata/ORA/redo03.log
-
2 /u01/app/oracle/oradata/ORA/redo02.log
-
1 /u01/app/oracle/oradata/ORA/redo01.log
---关闭数据库(模拟实验 )
-
SQL> shutdown immediate
-
Database closed.
-
Database dismounted.
-
ORACLE instance shut down.
-
SQL>
-
[oracle@zh ORA]$ pwd
-
/u01/app/oracle/oradata/ORA
-
[oracle@zh ORA]$ ls
-
control01.ctl redo01.log sysaux01.dbf undotbs01.dbf
-
control02.ctl redo02.log system01.dbf users01.dbf
-
example01.dbf redo03.log temp01.dbf
-
[oracle@zh ORA]$ rm redo02.log
-
[oracle@zh ORA]$ ls
-
control01.ctl example01.dbf redo03.log system01.dbf undotbs01.dbf
-
control02.ctl redo01.log sysaux01.dbf temp01.dbf users01.dbf
---启动数据库(直接open下会报错)
-
SQL> startup
-
ORACLE instance started.
-
-
Total System Global Area 939495424 bytes
-
Fixed Size 2258840 bytes
-
Variable Size 595593320 bytes
-
Database Buffers 335544320 bytes
-
Redo Buffers 6098944 bytes
-
Database mounted.
-
ORA-03113: end-of-file on communication channel
-
Process ID: 8034
-
Session ID: 125 Serial number: 5
-
-
SQL>
----查看警告日志(提示找不到日志文件)
-
ALTER DATABASE OPEN
-
Errors in file /u01/app/oracle/diag/rdbms/ora/ORA/trace/ORA_lgwr_8012.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/ORA/redo02.log'
-
ORA-27037: unable to obtain file status
-
Linux-x86_64 Error: 2: No such file or directory
----需要启到mount状态下
-
SQL> startup mount
-
ORACLE instance started.
-
-
Total System Global Area 939495424 bytes
-
Fixed Size 2258840 bytes
-
Variable Size 595593320 bytes
-
Database Buffers 335544320 bytes
-
Redo Buffers 6098944 bytes
-
Database mounted.
-
SQL>
-
----查看报错日志组是否为当前日志组
-
SQL> select group#,status from v$log;
-
\
-
GROUP# STATUS
-
---------- ----------------
-
1 INACTIVE
-
3 CURRENT
-
2 INACTIVE
-
-
SQL>
-
----clear日志组
-
SQL> alter database clear logfile group 2 ;
-
-
Database altered.
-
-
SQL>
-
--把库启到open下
-
SQL> alter database open;
-
-
Database altered.
-
-
SQL>
---查看回复的日志组成员
-
SQL> ! ls /u01/app/oracle/oradata/ORA
-
control01.ctl redo01.log sysaux01.dbf undotbs01.dbf
-
control02.ctl redo02.log system01.dbf users01.dbf
-
example01.dbf redo03.log temp01.dbf
-
-
SQL>
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/31399171/viewspace-2130289/
,如需转载,请注明出处,否则将追究法律责任。