1.查看当前的日志组成员:
09:59:28 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 09:59:42 SYS@ORA11GR2>select group#,members,bytes/1024/1024 M,status from v$log; GROUP# MEMBERS M STATUS ---------- ---------- ---------- ---------------- 1 1 50 CURRENT 2 1 50 INACTIVE 3 1 50 INACTIVE
2.给每个日志组增加一个成员:
09:59:49 SYS@ORA11GR2>alter database add logfile member 10:00:24 2 ‘/u01/app/oracle/disk/redo03b.log‘ to group 3; Database altered. 10:01:13 SYS@ORA11GR2>alter database add logfile member 10:01:25 2 ‘/u01/app/oracle/disk/redo02b.log‘ to group 2; Database altered. 10:02:30 SYS@ORA11GR2>alter database add logfile member 10:02:42 2 ‘/u01/app/oracle/disk/redo01b.log‘ to group 1; Database altered.
3.现在有三个日志组,每组都有两个成员:
10:02:53 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. 3.[[email protected]3 ~]$ ls /u01/app/oracle/disk redo01b.log redo02b.log redo03b.log
4.关库删除一个日志组成员:
10:04:21 SYS@ORA11GR2>shutdown immediate Database closed. Database dismounted. ORACLE instance shut down. [[email protected] ~]$ rm /u01/app/oracle/disk/redo03b.log
5.起库,不会报错:
10:05:28 SYS@ORA11GR2>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. Database opened.
6.但是看alert日志,会有找不到redo03b.log的日志文件
ORA-00313: open failed for members of log group 3 of thread 1 ORA-00312: online log 3 thread 1: ‘/u01/app/oracle/disk/redo03b.log‘ ORA-27037: unable to obtain file status Linux-x86_64 Error: 2: No such file or directory Additional information: 3 10:10:13 SYS@ORA11GR2>select group#,member,status from v$logfile; GROUP# MEMBER STATUS ---------- -------------------------------------------------- ------- 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 INVALID 2 /u01/app/oracle/disk/redo02b.log 1 /u01/app/oracle/disk/redo01b.log 6 rows selected.
7.解决办法:
关库 10:12:35 SYS@ORA11GR2>shutdown immediate Database closed. Database dismounted. ORACLE instance shut down. 系统层面拷贝一个 [[email protected] ~]$ cp /u01/app/oracle/disk/redo01b.log /u01/app/oracle/disk/redo03b.log 此时起库alert日志里也没有错误信息了 10:19:19 SYS@ORA11GR2>alter system switch logfile; System altered. 10:20:17 SYS@ORA11GR2>select group#,member,status from v$logfile; GROUP# MEMBER STATUS ---------- -------------------------------------------------- ------- 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.
时间: 2024-10-21 06:24:03