日志文件
在数据库正常运行时,
SQL> select * from v$log;
GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS
---------- ---------- ---------- ---------- ---------- --- ----------------
FIRST_CHANGE# FIRST_TIM
------------- ---------
1 1 8 52428800 1 YES INACTIVE
885613 27-NOV-12
2 1 9 52428800 1 YES INACTIVE
885618 27-NOV-12
3 1 10 52428800 1 NO CURRENT
885620 27-NOV-12
此时利用OS命令将redo03.log日志文件删除后
SQL> select * from v$log;
GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS
---------- ---------- ---------- ---------- ---------- --- ----------------
FIRST_CHANGE# FIRST_TIM
------------- ---------
1 1 8 52428800 1 YES INACTIVE
885613 27-NOV-12
2 1 9 52428800 1 YES INACTIVE
885618 27-NOV-12
3 1 10 52428800 1 NO CURRENT
885620 27-NOV-12
create table tb (id number);
commit;
SQL> select * from v$log;
GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS
---------- ---------- ---------- ---------- ---------- --- ----------------
FIRST_CHANGE# FIRST_TIM
------------- ---------
1 1 8 52428800 1 YES INACTIVE
885613 27-NOV-12
2 1 9 52428800 1 YES INACTIVE
885618 27-NOV-12
3 1 10 52428800 1 NO CURRENT
885620 27-NOV-12
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
Total System Global Area 167772160 bytes
Fixed Size 1218316 bytes
Variable Size 83888372 bytes
Database Buffers 79691776 bytes
Redo Buffers 2973696 bytes
Database mounted.
ORA-00313: open failed for members of log group 3 of thread 1
ORA-00312: online log 3 thread 1: '/u01/oracle/oradata/orcl/redo03.log'
SQL> select * from v$log;
GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS
---------- ---------- ---------- ---------- ---------- --- ----------------
FIRST_CHANGE# FIRST_TIM
------------- ---------
1 1 8 52428800 1 YES INACTIVE
885613 27-NOV-12
3 1 10 52428800 1 NO CURRENT
885620 27-NOV-12
2 1 9 52428800 1 YES INACTIVE
885618 27-NOV-12
$ ll -t
total 24092
-rw-r----- 1 oracle oinstall 1024 Nov 27 21:44 9_1_800485542.log
-rw-r----- 1 oracle oinstall 2048 Nov 27 21:44 8_1_800485542.log
-rw-r----- 1 oracle oinstall 1024 Nov 27 21:44 7_1_800485542.log
-rw-r----- 1 oracle oinstall 1010688 Nov 27 21:44 6_1_800485542.log
-rw-r----- 1 oracle oinstall 260608 Nov 27 21:24 5_1_800485542.log
-rw-r----- 1 oracle oinstall 296448 Nov 27 21:18 4_1_800485542.log
-rw-r----- 1 oracle oinstall 25600 Nov 27 21:10 3_1_800485542.log
-rw-r----- 1 oracle oinstall 124928 Nov 27 21:10 2_1_800485542.log
-rw-r----- 1 oracle oinstall 1024 Nov 27 21:05 1_1_800485542.log
SQL> alter database clear logfile group 3;
alter database clear logfile group 3
*
ERROR at line 1:
ORA-00350: log 3 of instance orcl (thread 1) needs to be archived
ORA-00312: online log 3 thread 1: '/u01/oracle/oradata/orcl/redo03.log'
为什么在数据库处于open状态时,将正在使用的redo03.log日志文件删除后,通过v$log视图查询得知current日志文件还是group 3,而且能够对数据库进行建表操作,那么日志都写到了哪个地方?
如何才能打开数据库,各位大侠给个解决方案?
页:
[1]