全部博文(178)
分类: LINUX
2009-09-13 23:54:39
SQL> select *from vlog;
select *from vlog
*
ERROR at line 1:
ORA-00942: table or view does not exist
SQL> select *from v$log;
GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS
---------- ---------- ---------- ---------- ---------- --- ----------------
FIRST_CHANGE# FIRST_TIM
------------- ---------
1 1 13 52428800 1 YES INACTIVE
484353 08-APR-09
2 1 14 52428800 1 YES INACTIVE
484406 08-APR-09
3 1 15 52428800 1 NO CURRENT
511725 19-JUN-09
GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS
---------- ---------- ---------- ---------- ---------- --- ----------------
FIRST_CHANGE# FIRST_TIM
------------- ---------
4 1 0 15728640 2 YES UNUSED
0
SQL> select *from v$logfile;
GROUP# STATUS TYPE MEMBER
---------- ------- ------- --------------------------------------------------
IS_
---
3 ONLINE /home/oracle/oradata/lydb/redo03.log
NO
2 STALE ONLINE /home/oracle/oradata/lydb/redo02.log
NO
1 ONLINE /home/oracle/oradata/lydb/redo01.log
NO
GROUP# STATUS TYPE MEMBER
---------- ------- ------- --------------------------------------------------
IS_
---
4 ONLINE /home/oracle/oradata/lydb/redo04a.log
NO
4 ONLINE /home/oracle/oradata/lydb/redo04b.log
NO
SQL> alter database drop logfile group 4;
Database altered.
SQL> select *from v$logfile;
GROUP# STATUS TYPE MEMBER
---------- ------- ------- --------------------------------------------------
IS_
---
3 ONLINE /home/oracle/oradata/lydb/redo03.log
NO
2 STALE ONLINE /home/oracle/oradata/lydb/redo02.log
NO
1 ONLINE /home/oracle/oradata/lydb/redo01.log
NO
SQL> select *from v$log;
GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS
---------- ---------- ---------- ---------- ---------- --- ----------------
FIRST_CHANGE# FIRST_TIM
------------- ---------
1 1 13 52428800 1 YES INACTIVE
484353 08-APR-09
2 1 14 52428800 1 YES INACTIVE
484406 08-APR-09
3 1 15 52428800 1 NO CURRENT
511725 19-JUN-09
SQL> alter database add logfile ('/home/oracle/oradata/lydb/redo04a.log','/home/oracle/oradata/lydb/redo04b.log') size 15m ;
alter database add logfile ('/home/oracle/oradata/lydb/redo04a.log','/home/oracle/oradata/lydb/redo04b.log') size 15m
*
ERROR at line 1:
ORA-00301: error in adding log file '/home/oracle/oradata/lydb/redo04a.log' -
file cannot be created
ORA-27038: created file already exists
Additional information: 1
SQL> alter database add logfile ('/home/oracle/oradata/lydb/redo04a.log','/home/oracle/oradata/lydb/redo04b.log') reuse ;
Database altered.
SQL> select *from v$logfile;
GROUP# STATUS TYPE MEMBER
---------- ------- ------- --------------------------------------------------
IS_
---
3 ONLINE /home/oracle/oradata/lydb/redo03.log
NO
2 STALE ONLINE /home/oracle/oradata/lydb/redo02.log
NO
1 ONLINE /home/oracle/oradata/lydb/redo01.log
NO
GROUP# STATUS TYPE MEMBER
---------- ------- ------- --------------------------------------------------
IS_
---
4 ONLINE /home/oracle/oradata/lydb/redo04a.log
NO
4 ONLINE /home/oracle/oradata/lydb/redo04b.log
NO
SQL> select *from v$log;
GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS
---------- ---------- ---------- ---------- ---------- --- ----------------
FIRST_CHANGE# FIRST_TIM
------------- ---------
1 1 13 52428800 1 YES INACTIVE
484353 08-APR-09
2 1 14 52428800 1 YES INACTIVE
484406 08-APR-09
3 1 15 52428800 1 NO CURRENT
511725 19-JUN-09
GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS
---------- ---------- ---------- ---------- ---------- --- ----------------
FIRST_CHANGE# FIRST_TIM
------------- ---------
4 1 0 15728640 2 YES UNUSED
0
SQL> select *from v$logfile;
GROUP# STATUS TYPE MEMBER
---------- ------- ------- --------------------------------------------------
IS_
---
3 ONLINE /home/oracle/oradata/lydb/redo03.log
NO
2 STALE ONLINE /home/oracle/oradata/lydb/redo02.log
NO
1 ONLINE /home/oracle/oradata/lydb/redo01.log
NO
GROUP# STATUS TYPE MEMBER
---------- ------- ------- --------------------------------------------------
IS_
---
4 ONLINE /home/oracle/oradata/lydb/redo04a.log
NO
4 ONLINE /home/oracle/oradata/lydb/redo04b.log
NO
SQL> alter database add logfile member '/home/oracle/oradata/lydb/redo01b.log' to group 1 ,'/home/oracle/oradata/lydb/redo02b.log' to group 2 ,'/home/oracle/oradata/lydb/redo03b.log' to group 3 ;
Database altered.
SQL> select *from v$logfile;
GROUP# STATUS TYPE MEMBER
---------- ------- ------- --------------------------------------------------
IS_
---
3 ONLINE /home/oracle/oradata/lydb/redo03.log
NO
2 STALE ONLINE /home/oracle/oradata/lydb/redo02.log
NO
1 ONLINE /home/oracle/oradata/lydb/redo01.log
NO
GROUP# STATUS TYPE MEMBER
---------- ------- ------- --------------------------------------------------
IS_
---
4 ONLINE /home/oracle/oradata/lydb/redo04a.log
NO
4 ONLINE /home/oracle/oradata/lydb/redo04b.log
NO
1 INVALID ONLINE /home/oracle/oradata/lydb/redo01b.log
NO
GROUP# STATUS TYPE MEMBER
---------- ------- ------- --------------------------------------------------
IS_
---
2 INVALID ONLINE /home/oracle/oradata/lydb/redo02b.log
NO
3 INVALID ONLINE /home/oracle/oradata/lydb/redo03b.log
NO
8 rows selected.
SQL> alter system switch logfile;
System altered.
SQL> alter system switch logfile;
System altered.
SQL> alter system switch logfile;
System altered.
SQL> alter system switch logfile;
select *from v$logfile;
System altered.
SQL>
GROUP# STATUS TYPE MEMBER
---------- ------- ------- --------------------------------------------------
IS_
---
3 ONLINE /home/oracle/oradata/lydb/redo03.log
NO
2 ONLINE /home/oracle/oradata/lydb/redo02.log
NO
1 ONLINE /home/oracle/oradata/lydb/redo01.log
NO
GROUP# STATUS TYPE MEMBER
---------- ------- ------- --------------------------------------------------
IS_
---
4 ONLINE /home/oracle/oradata/lydb/redo04a.log
NO
4 ONLINE /home/oracle/oradata/lydb/redo04b.log
NO
1 ONLINE /home/oracle/oradata/lydb/redo01b.log
NO
GROUP# STATUS TYPE MEMBER
---------- ------- ------- --------------------------------------------------
IS_
---
2 ONLINE /home/oracle/oradata/lydb/redo02b.log
NO
3 ONLINE /home/oracle/oradata/lydb/redo03b.log
NO
8 rows selected.
SQL> select *from v$log
2 ;
GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS
---------- ---------- ---------- ---------- ---------- --- ----------------
FIRST_CHANGE# FIRST_TIM
------------- ---------
1 1 17 52428800 2 YES INACTIVE
520559 19-JUN-09
2 1 18 52428800 2 YES INACTIVE
520561 19-JUN-09
3 1 19 52428800 2 NO CURRENT
520563 19-JUN-09
GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS
---------- ---------- ---------- ---------- ---------- --- ----------------
FIRST_CHANGE# FIRST_TIM
------------- ---------
4 1 16 15728640 2 YES INACTIVE
520557 19-JUN-09
SQL> desc v$log;
Name Null? Type
----------------------------------------- -------- ----------------------------
GROUP# NUMBER
THREAD# NUMBER
SEQUENCE# NUMBER
BYTES NUMBER
MEMBERS NUMBER
ARCHIVED VARCHAR2(3)
STATUS VARCHAR2(16)
FIRST_CHANGE# NUMBER
FIRST_TIME DATE
SQL> select GROUP#, bytes, members archived ,status, from v$Log;
select GROUP#, bytes, members archived ,status, from v$Log
*
ERROR at line 1:
ORA-00936: missing expression
SQL> select * from v$Log;
GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS
---------- ---------- ---------- ---------- ---------- --- ----------------
FIRST_CHANGE# FIRST_TIM
------------- ---------
1 1 17 52428800 2 YES INACTIVE
520559 19-JUN-09
2 1 18 52428800 2 YES INACTIVE
520561 19-JUN-09
3 1 19 52428800 2 NO CURRENT
520563 19-JUN-09
GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS
---------- ---------- ---------- ---------- ---------- --- ----------------
FIRST_CHANGE# FIRST_TIM
------------- ---------
4 1 16 15728640 2 YES INACTIVE
520557 19-JUN-09
SQL> show parameter achiv
SQL> set linesize 200 ;
SQL> /
GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS FIRST_CHANGE# FIRST_TIM
---------- ---------- ---------- ---------- ---------- --- ---------------- ------------- ---------
1 1 17 52428800 2 YES INACTIVE 520559 19-JUN-09
2 1 18 52428800 2 YES INACTIVE 520561 19-JUN-09
3 1 19 52428800 2 NO CURRENT 520563 19-JUN-09
4 1 16 15728640 2 YES INACTIVE 520557 19-JUN-09
SQL>
SQL>
SQL>
SQL> select *from v$logfile;
GROUP# STATUS TYPE MEMBER IS_
---------- ------- ------- -------------------------------------------------- ---
3 ONLINE /home/oracle/oradata/lydb/redo03.log NO
2 ONLINE /home/oracle/oradata/lydb/redo02.log NO
1 ONLINE /home/oracle/oradata/lydb/redo01.log NO
4 ONLINE /home/oracle/oradata/lydb/redo04a.log NO
4 ONLINE /home/oracle/oradata/lydb/redo04b.log NO
1 ONLINE /home/oracle/oradata/lydb/redo01b.log NO
2 ONLINE /home/oracle/oradata/lydb/redo02b.log NO
3 ONLINE /home/oracle/oradata/lydb/redo03b.log NO
8 rows selected.
SQL> alter database drop logfile group 2;
Database altered.
SQL> alter database add logfile group 2 ('/home/oracle/oradata/lydb/redo02a.log','/home/oracle/oradata/lydb/redo02b.log');
alter database add logfile group 2 ('/home/oracle/oradata/lydb/redo02a.log','/home/oracle/oradata/lydb/redo02b.log')
*
ERROR at line 1:
ORA-00301: error in adding log file '/home/oracle/oradata/lydb/redo02a.log' - file cannot be created
ORA-17610: file '/home/oracle/oradata/lydb/redo02a.log' does not exist and no size specified
ORA-27037: unable to obtain file status
Linux Error: 2: No such file or directory
Additional information: 3
SQL> alter database add logfile group 2 ('/home/oracle/oradata/lydb/redo02a.log','/home/oracle/oradata/lydb/redo02b.log') size 15m;
alter database add logfile group 2 ('/home/oracle/oradata/lydb/redo02a.log','/home/oracle/oradata/lydb/redo02b.log') size 15m
*
ERROR at line 1:
ORA-00301: error in adding log file '/home/oracle/oradata/lydb/redo02b.log' - file cannot be created
ORA-27038: created file already exists
Additional information: 1
SQL> alter database add logfile group 2 ('/home/oracle/oradata/lydb/redo02a.log','/home/oracle/oradata/lydb/redo02b.log') reuse ;
alter database add logfile group 2 ('/home/oracle/oradata/lydb/redo02a.log','/home/oracle/oradata/lydb/redo02b.log') reuse
*
ERROR at line 1:
ORA-00301: error in adding log file '/home/oracle/oradata/lydb/redo02a.log' - file cannot be created
ORA-17610: file '/home/oracle/oradata/lydb/redo02a.log' does not exist and no size specified
ORA-27037: unable to obtain file status
Linux Error: 2: No such file or directory
Additional information: 3
SQL> alter database add logfile group 2 ('/home/oracle/oradata/lydb/redo02_new_a.log','/home/oracle/oradata/lydb/redo02_new_b.log') size 15m;
Database altered.
SQL> select *v$logfile;
select *v$logfile
*
ERROR at line 1:
ORA-00923: FROM keyword not found where expected
SQL> select *from v$logfile;
GROUP# STATUS TYPE MEMBER IS_
---------- ------- ------- -------------------------------------------------- ---
3 ONLINE /home/oracle/oradata/lydb/redo03.log NO
2 ONLINE /home/oracle/oradata/lydb/redo02_new_a.log NO
1 ONLINE /home/oracle/oradata/lydb/redo01.log NO
4 ONLINE /home/oracle/oradata/lydb/redo04a.log NO
4 ONLINE /home/oracle/oradata/lydb/redo04b.log NO
1 ONLINE /home/oracle/oradata/lydb/redo01b.log NO
2 ONLINE /home/oracle/oradata/lydb/redo02_new_b.log NO
3 ONLINE /home/oracle/oradata/lydb/redo03b.log NO
8 rows selected.
SQL> desc v$log;
Name Null? Type
----------------------------------------------------------------------------------------------------------------- -------- ----------------------------------------------------------------------------
GROUP# NUMBER
THREAD# NUMBER
SEQUENCE# NUMBER
BYTES NUMBER
MEMBERS NUMBER
ARCHIVED VARCHAR2(3)
STATUS VARCHAR2(16)
FIRST_CHANGE# NUMBER
FIRST_TIME DATE
SQL> select group# ,status ,members from v$log;
GROUP# STATUS MEMBERS
---------- ---------------- ----------
1 INACTIVE 2
2 UNUSED 2
3 CURRENT 2
4 INACTIVE 2
SQL> alter database drop logfile group 4;
Database altered.
SQL> alter database add logfile group 4 ('/home/oracle/oradata/lydb/redo04_new_a.log','/home/oracle/oradata/lydb/redo04_new_b.log') size 15m;
Database altered.
SQL> select group# ,status ,members from v$log;
GROUP# STATUS MEMBERS
---------- ---------------- ----------
1 INACTIVE 2
2 UNUSED 2
3 CURRENT 2
4 UNUSED 2
SQL> alter database drop logfile group 1;
Database altered.
SQL> alter database add logfile group 1 ('/home/oracle/oradata/lydb/redo01_new_a.log','/home/oracle/oradata/lydb/redo01_new_b.log') size 15m;
Database altered.
SQL> select * from v$logfile;
GROUP# STATUS TYPE MEMBER IS_
---------- ------- ------- -------------------------------------------------- ---
3 ONLINE /home/oracle/oradata/lydb/redo03.log NO
2 ONLINE /home/oracle/oradata/lydb/redo02_new_a.log NO
1 ONLINE /home/oracle/oradata/lydb/redo01_new_a.log NO
4 ONLINE /home/oracle/oradata/lydb/redo04_new_a.log NO
4 ONLINE /home/oracle/oradata/lydb/redo04_new_b.log NO
1 ONLINE /home/oracle/oradata/lydb/redo01_new_b.log NO
2 ONLINE /home/oracle/oradata/lydb/redo02_new_b.log NO
3 ONLINE /home/oracle/oradata/lydb/redo03b.log NO
8 rows selected.
SQL> select * from v$log;
GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS FIRST_CHANGE# FIRST_TIM
---------- ---------- ---------- ---------- ---------- --- ---------------- ------------- ---------
1 1 0 15728640 2 YES UNUSED 0
2 1 0 15728640 2 YES UNUSED 0
3 1 19 52428800 2 NO CURRENT 520563 19-JUN-09
4 1 0 15728640 2 YES UNUSED 0
SQL> alter system switch logfile ;
System altered.
SQL> select * from v$log;
GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS FIRST_CHANGE# FIRST_TIM
---------- ---------- ---------- ---------- ---------- --- ---------------- ------------- ---------
1 1 20 15728640 2 NO CURRENT 520799 19-JUN-09
2 1 0 15728640 2 YES UNUSED 0
3 1 19 52428800 2 YES ACTIVE 520563 19-JUN-09
4 1 0 15728640 2 YES UNUSED 0
SQL> select * from v$logfile;
GROUP# STATUS TYPE MEMBER IS_
---------- ------- ------- -------------------------------------------------- ---
3 ONLINE /home/oracle/oradata/lydb/redo03.log NO
2 ONLINE /home/oracle/oradata/lydb/redo02_new_a.log NO
1 ONLINE /home/oracle/oradata/lydb/redo01_new_a.log NO
4 ONLINE /home/oracle/oradata/lydb/redo04_new_a.log NO
4 ONLINE /home/oracle/oradata/lydb/redo04_new_b.log NO
1 ONLINE /home/oracle/oradata/lydb/redo01_new_b.log NO
2 ONLINE /home/oracle/oradata/lydb/redo02_new_b.log NO
3 ONLINE /home/oracle/oradata/lydb/redo03b.log NO
8 rows selected.
SQL> alter database drop logfile group 3 ;
alter database drop logfile group 3
*
ERROR at line 1:
ORA-01624: log 3 needed for crash recovery of instance lydb (thread 1)
ORA-00312: online log 3 thread 1: '/home/oracle/oradata/lydb/redo03.log'
ORA-00312: online log 3 thread 1: '/home/oracle/oradata/lydb/redo03b.log'
SQL> select * from v$logfile;
GROUP# STATUS TYPE MEMBER IS_
---------- ------- ------- -------------------------------------------------- ---
3 ONLINE /home/oracle/oradata/lydb/redo03.log NO
2 ONLINE /home/oracle/oradata/lydb/redo02_new_a.log NO
1 ONLINE /home/oracle/oradata/lydb/redo01_new_a.log NO
4 ONLINE /home/oracle/oradata/lydb/redo04_new_a.log NO
4 ONLINE /home/oracle/oradata/lydb/redo04_new_b.log NO
1 ONLINE /home/oracle/oradata/lydb/redo01_new_b.log NO
2 ONLINE /home/oracle/oradata/lydb/redo02_new_b.log NO
3 ONLINE /home/oracle/oradata/lydb/redo03b.log NO
8 rows selected.
SQL> select * from v$log;
GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS FIRST_CHANGE# FIRST_TIM
---------- ---------- ---------- ---------- ---------- --- ---------------- ------------- ---------
1 1 20 15728640 2 NO CURRENT 520799 19-JUN-09
2 1 0 15728640 2 YES UNUSED 0
3 1 19 52428800 2 YES ACTIVE 520563 19-JUN-09
4 1 0 15728640 2 YES UNUSED 0
SQL> alter system switch logfile ;
System altered.
SQL> alter system switch logfile ;
System altered.
SQL> alter system switch logfile ;
alter system switch logfile ;
select * from v$log;
System altered.
SQL>
System altered.
SQL>
GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS FIRST_CHANGE# FIRST_TIM
---------- ---------- ---------- ---------- ---------- --- ---------------- ------------- ---------
1 1 24 15728640 2 NO CURRENT 520823 19-JUN-09
2 1 21 15728640 2 YES INACTIVE 520811 19-JUN-09
3 1 23 52428800 2 NO ACTIVE 520820 19-JUN-09
4 1 22 15728640 2 NO ACTIVE 520813 19-JUN-09
SQL> alter database drop logfile group 3 ;
alter database drop logfile group 3
*
ERROR at line 1:
ORA-01624: log 3 needed for crash recovery of instance lydb (thread 1)
ORA-00312: online log 3 thread 1: '/home/oracle/oradata/lydb/redo03.log'
ORA-00312: online log 3 thread 1: '/home/oracle/oradata/lydb/redo03b.log'
SQL> alter database drop logfile group 3 ;
alter database drop logfile group 3
*
ERROR at line 1:
ORA-01624: log 3 needed for crash recovery of instance lydb (thread 1)
ORA-00312: online log 3 thread 1: '/home/oracle/oradata/lydb/redo03.log'
ORA-00312: online log 3 thread 1: '/home/oracle/oradata/lydb/redo03b.log'
SQL> alter system switch logfile ;
System altered.
SQL> alter system switch logfile ;
alter system switch logfile ;
alter system switch logfile ;
alter system switch logfile ;
System altered.
SQL> alter database drop logfile group 3 ;
System altered.
SQL>
System altered.
SQL> select * from v$log;
System altered.
SQL> alter database drop logfile group 3
*
ERROR at line 1:
ORA-01624: log 3 needed for crash recovery of instance lydb (thread 1)
ORA-00312: online log 3 thread 1: '/home/oracle/oradata/lydb/redo03.log'
ORA-00312: online log 3 thread 1: '/home/oracle/oradata/lydb/redo03b.log'
SQL>
GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS FIRST_CHANGE# FIRST_TIM
---------- ---------- ---------- ---------- ---------- --- ---------------- ------------- ---------
1 1 28 15728640 2 NO ACTIVE 520863 19-JUN-09
2 1 29 15728640 2 NO CURRENT 520865 19-JUN-09
3 1 27 52428800 2 NO ACTIVE 520861 19-JUN-09
4 1 26 15728640 2 YES INACTIVE 520859 19-JUN-09
SQL> alter database drop logfile group 3 ;
Database altered.
SQL> select * from v$logfile;
GROUP# STATUS TYPE MEMBER IS_
---------- ------- ------- -------------------------------------------------- ---
2 ONLINE /home/oracle/oradata/lydb/redo02_new_a.log NO
1 ONLINE /home/oracle/oradata/lydb/redo01_new_a.log NO
4 ONLINE /home/oracle/oradata/lydb/redo04_new_a.log NO
4 ONLINE /home/oracle/oradata/lydb/redo04_new_b.log NO
1 ONLINE /home/oracle/oradata/lydb/redo01_new_b.log NO
2 ONLINE /home/oracle/oradata/lydb/redo02_new_b.log NO
6 rows selected.
SQL> select * from v$log;
GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS FIRST_CHANGE# FIRST_TIM
---------- ---------- ---------- ---------- ---------- --- ---------------- ------------- ---------
1 1 28 15728640 2 YES INACTIVE 520863 19-JUN-09
2 1 29 15728640 2 NO CURRENT 520865 19-JUN-09
4 1 26 15728640 2 YES INACTIVE 520859 19-JUN-09
SQL> select * from v$log;
GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS FIRST_CHANGE# FIRST_TIM
---------- ---------- ---------- ---------- ---------- --- ---------------- ------------- ---------
1 1 28 15728640 2 YES INACTIVE 520863 19-JUN-09
2 1 29 15728640 2 NO CURRENT 520865 19-JUN-09
4 1 26 15728640 2 YES INACTIVE 520859 19-JUN-09
SQL> select * from v$log;
GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS FIRST_CHANGE# FIRST_TIM
---------- ---------- ---------- ---------- ---------- --- ---------------- ------------- ---------
1 1 28 15728640 2 YES INACTIVE 520863 19-JUN-09
2 1 29 15728640 2 NO CURRENT 520865 19-JUN-09
4 1 26 15728640 2 YES INACTIVE 520859 19-JUN-09
SQL> select * from v$log;
GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS FIRST_CHANGE# FIRST_TIM
---------- ---------- ---------- ---------- ---------- --- ---------------- ------------- ---------
1 1 28 15728640 2 YES INACTIVE 520863 19-JUN-09
2 1 29 15728640 2 NO CURRENT 520865 19-JUN-09
4 1 26 15728640 2 YES INACTIVE 520859 19-JUN-09
SQL> select * from v$log;
GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS FIRST_CHANGE# FIRST_TIM
---------- ---------- ---------- ---------- ---------- --- ---------------- ------------- ---------
1 1 28 15728640 2 YES INACTIVE 520863 19-JUN-09
2 1 29 15728640 2 NO CURRENT 520865 19-JUN-09
4 1 26 15728640 2 YES INACTIVE 520859 19-JUN-09
SQL> alter database add logfile group 3 ('/home/oracle/oradata/lydb/redo03_new_a.log','/home/oracle/oradata/lydb/redo03_new_b.log') size 15m;
Database altered.
SQL> select * from v$log;
GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS FIRST_CHANGE# FIRST_TIM
---------- ---------- ---------- ---------- ---------- --- ---------------- ------------- ---------
1 1 28 15728640 2 YES INACTIVE 520863 19-JUN-09
2 1 29 15728640 2 NO CURRENT 520865 19-JUN-09
3 1 0 15728640 2 YES UNUSED 0
4 1 26 15728640 2 YES INACTIVE 520859 19-JUN-09
SQL> select * from v$log;
GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS FIRST_CHANGE# FIRST_TIM
---------- ---------- ---------- ---------- ---------- --- ---------------- ------------- ---------
1 1 28 15728640 2 YES INACTIVE 520863 19-JUN-09
2 1 29 15728640 2 NO CURRENT 520865 19-JUN-09
3 1 0 15728640 2 YES UNUSED 0
4 1 26 15728640 2 YES INACTIVE 520859 19-JUN-09
SQL> select * from v$log;
GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS FIRST_CHANGE# FIRST_TIM
---------- ---------- ---------- ---------- ---------- --- ---------------- ------------- ---------
1 1 28 15728640 2 YES INACTIVE 520863 19-JUN-09
2 1 29 15728640 2 NO CURRENT 520865 19-JUN-09
3 1 0 15728640 2 YES UNUSED 0
4 1 26 15728640 2 YES INACTIVE 520859 19-JUN-09
SQL> select * from v$log;
GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS FIRST_CHANGE# FIRST_TIM
---------- ---------- ---------- ---------- ---------- --- ---------------- ------------- ---------
1 1 28 15728640 2 YES INACTIVE 520863 19-JUN-09
2 1 29 15728640 2 NO CURRENT 520865 19-JUN-09
3 1 0 15728640 2 YES UNUSED 0
4 1 26 15728640 2 YES INACTIVE 520859 19-JUN-09
SQL> select * from v$log;
GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS FIRST_CHANGE# FIRST_TIM
---------- ---------- ---------- ---------- ---------- --- ---------------- ------------- ---------
1 1 28 15728640 2 YES INACTIVE 520863 19-JUN-09
2 1 29 15728640 2 NO CURRENT 520865 19-JUN-09
3 1 0 15728640 2 YES UNUSED 0
4 1 26 15728640 2 YES INACTIVE 520859 19-JUN-09
SQL> select * from v$log;
GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS FIRST_CHANGE# FIRST_TIM
---------- ---------- ---------- ---------- ---------- --- ---------------- ------------- ---------
1 1 28 15728640 2 YES INACTIVE 520863 19-JUN-09
2 1 29 15728640 2 NO CURRENT 520865 19-JUN-09
3 1 0 15728640 2 YES UNUSED 0
4 1 26 15728640 2 YES INACTIVE 520859 19-JUN-09
SQL> select * from v$logfile;
GROUP# STATUS TYPE MEMBER IS_
---------- ------- ------- -------------------------------------------------- ---
3 ONLINE /home/oracle/oradata/lydb/redo03_new_a.log NO
2 ONLINE /home/oracle/oradata/lydb/redo02_new_a.log NO
1 ONLINE /home/oracle/oradata/lydb/redo01_new_a.log NO
4 ONLINE /home/oracle/oradata/lydb/redo04_new_a.log NO
4 ONLINE /home/oracle/oradata/lydb/redo04_new_b.log NO
1 ONLINE /home/oracle/oradata/lydb/redo01_new_b.log NO
2 ONLINE /home/oracle/oradata/lydb/redo02_new_b.log NO
3 ONLINE /home/oracle/oradata/lydb/redo03_new_b.log NO
8 rows selected.
SQL> alter system switch logfile ;
System altered.
SQL> alter system switch logfile ;
System altered.
SQL> select * from v$logfile;
GROUP# STATUS TYPE MEMBER IS_
---------- ------- ------- -------------------------------------------------- ---
3 ONLINE /home/oracle/oradata/lydb/redo03_new_a.log NO
2 ONLINE /home/oracle/oradata/lydb/redo02_new_a.log NO
1 ONLINE /home/oracle/oradata/lydb/redo01_new_a.log NO
4 ONLINE /home/oracle/oradata/lydb/redo04_new_a.log NO
4 ONLINE /home/oracle/oradata/lydb/redo04_new_b.log NO
1 ONLINE /home/oracle/oradata/lydb/redo01_new_b.log NO
2 ONLINE /home/oracle/oradata/lydb/redo02_new_b.log NO
3 ONLINE /home/oracle/oradata/lydb/redo03_new_b.log NO
8 rows selected.
SQL> select *from v$log;
GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS FIRST_CHANGE# FIRST_TIM
---------- ---------- ---------- ---------- ---------- --- ---------------- ------------- ---------
1 1 28 15728640 2 YES INACTIVE 520863 19-JUN-09
2 1 29 15728640 2 YES ACTIVE 520865 19-JUN-09
3 1 30 15728640 2 YES ACTIVE 520886 19-JUN-09
4 1 31 15728640 2 NO CURRENT 520888 19-JUN-09
SQL> alter system switch logfile ;
System altered.
SQL> alter system switch logfile ;
select *from v$log;
System altered.
SQL>
GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS FIRST_CHANGE# FIRST_TIM
---------- ---------- ---------- ---------- ---------- --- ---------------- ------------- ---------
1 1 32 15728640 2 NO ACTIVE 520902 19-JUN-09
2 1 33 15728640 2 NO CURRENT 520905 19-JUN-09
3 1 30 15728640 2 YES ACTIVE 520886 19-JUN-09
4 1 31 15728640 2 YES ACTIVE 520888 19-JUN-09
SQL> select *from v$logfile;
GROUP# STATUS TYPE MEMBER IS_
---------- ------- ------- -------------------------------------------------- ---
3 ONLINE /home/oracle/oradata/lydb/redo03_new_a.log NO
2 ONLINE /home/oracle/oradata/lydb/redo02_new_a.log NO
1 ONLINE /home/oracle/oradata/lydb/redo01_new_a.log NO
4 ONLINE /home/oracle/oradata/lydb/redo04_new_a.log NO
4 ONLINE /home/oracle/oradata/lydb/redo04_new_b.log NO
1 ONLINE /home/oracle/oradata/lydb/redo01_new_b.log NO
2 ONLINE /home/oracle/oradata/lydb/redo02_new_b.log NO
3 ONLINE /home/oracle/oradata/lydb/redo03_new_b.log NO
8 rows selected.
SQL> select *from v$log;
GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS FIRST_CHANGE# FIRST_TIM
---------- ---------- ---------- ---------- ---------- --- ---------------- ------------- ---------
1 1 32 15728640 2 YES ACTIVE 520902 19-JUN-09
2 1 33 15728640 2 NO CURRENT 520905 19-JUN-09
3 1 30 15728640 2 YES ACTIVE 520886 19-JUN-09
4 1 31 15728640 2 YES ACTIVE 520888 19-JUN-09
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup;
ORACLE instance started.
Total System Global Area 247463936 bytes
Fixed Size 1266824 bytes
Variable Size 83889016 bytes
Database Buffers 155189248 bytes
Redo Buffers 7118848 bytes
Database mounted.
Database opened.
SQL> select * from v$log;
GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS &nb