SlideShare a Scribd company logo
REDO LOGFILE ADD ACTIVITY IN RAC 11gR2:
```````````````````````````````````````
first check logfiles:
```````````````````
query:
set echo off
set feedback off
set linesize 120
set pagesize 35
set trim on
set trims on
set lines 120
col group# format 999
col thread# format 999
col member format a70 wrap
col status format a10
col archived format a10
col fsize format 999 heading "Size (MB)"
select l.group#, l.thread#,
f.member,
l.archived,
l.status,
(bytes/1024/1024) fsize
from
v$log l, v$logfile f
where f.group# = l.group#
order by 1,2
/
GROUP# THREAD# MEMBER
ARCHIVED STATUS Size (MB)
------ -------
----------------------------------------------------------------------
---------- ---------- ---------
1 1 +DATA/RAC/ONLINELOG/group_1.281.961580081
YES INACTIVE 50
1 1 +FRA/RAC/ONLINELOG/group_1.263.961580087
YES INACTIVE 50
2 1 +DATA/RAC/ONLINELOG/group_2.282.961580091
NO CURRENT 50
2 1 +FRA/RAC/ONLINELOG/group_2.264.961580095
NO CURRENT 50
3 2 +DATA/RAC/ONLINELOG/group_3.288.961583983
YES INACTIVE 50
3 2 +FRA/RAC/ONLINELOG/group_3.265.961583989
YES INACTIVE 50
4 2 +DATA/RAC/ONLINELOG/group_4.289.961583993
NO CURRENT 50
4 2 +FRA/RAC/ONLINELOG/group_4.266.961583997
NO CURRENT 50
We will add new logfiles in thread 1 and 2 of size 100M.
So we can observe here thread 1 having two groups i.e. group 1&2, similarly
thread 2 having two groups i.e. group 3&4 of logfile
size 50M.
Now we'll add two new groups for thread 1 ( group 5&6) & for thread 2 (group
7&8) respectively.
alter database add logfile thread 1 group 5 ('+DATA','+FRA') size 100M;
alter database add logfile thread 1 group 6 ('+DATA','+FRA') size 100M;
alter database add logfile thread 2 group 7 ('+DATA','+FRA') size 100M;
alter database add logfile thread 2 group 8 ('+DATA','+FRA') size 100M;
After that please check logfiles being added or not:
select l.group#, l.thread#,
f.member,
l.archived,
l.status,
(bytes/1024/1024) fsize
from
v$log l, v$logfile f
where f.group# = l.group#
order by 1,2
/
GROUP# THREAD# MEMBER
ARCHIVED STATUS Size (MB)
------ -------
----------------------------------------------------------------------
---------- ---------- ---------
1 1 +DATA/RAC/ONLINELOG/group_1.281.961580081
YES INACTIVE 50
1 1 +FRA/RAC/ONLINELOG/group_1.263.961580087
YES INACTIVE 50
2 1 +DATA/RAC/ONLINELOG/group_2.282.961580091
NO CURRENT 50
2 1 +FRA/RAC/ONLINELOG/group_2.264.961580095
NO CURRENT 50
3 2 +DATA/RAC/ONLINELOG/group_3.288.961583983
YES INACTIVE 50
3 2 +FRA/RAC/ONLINELOG/group_3.265.961583989
YES INACTIVE 50
4 2 +DATA/RAC/ONLINELOG/group_4.289.961583993
NO CURRENT 50
4 2 +FRA/RAC/ONLINELOG/group_4.266.961583997
NO CURRENT 50
5 1 +DATA/RAC/ONLINELOG/group_5.298.980087539
YES UNUSED 100
5 1 +FRA/RAC/ONLINELOG/group_5.360.980087597
YES UNUSED 100
6 1 +DATA/RAC/ONLINELOG/group_6.299.980087677
YES UNUSED 100
6 1 +FRA/RAC/ONLINELOG/group_6.361.980087735
YES UNUSED 100
7 2 +DATA/RAC/ONLINELOG/group_7.300.980087819
YES UNUSED 100
7 2 +FRA/RAC/ONLINELOG/group_7.362.980087867
YES UNUSED 100
8 2 +DATA/RAC/ONLINELOG/group_8.301.980088099
YES UNUSED 100
8 2 +FRA/RAC/ONLINELOG/group_8.363.980088139
YES UNUSED 100
Elapsed: 00:00:09.08
Now we will login both the nodes with different putty session and will run "
alter system swith logfile; "
until thread 1 & 2 groups get switched and the 50M logfile get inactive
respectively.
alter system switch logfile;
select l.group#, l.thread#, f.member, l.archived, l.status, (bytes/1024/1024)
fsize
from v$log l, v$logfile f where f.group# = l.group#
and l.thread#=1 ;
alter system switch logfile;
select l.group#, l.thread#, f.member, l.archived, l.status, (bytes/1024/1024)
fsize
from v$log l, v$logfile f where f.group# = l.group#
and l.thread#=2 ;
Then we can drop inactive groups for thread 1 & 2:
from instance 1:
alter database drop logfile group 1;
alter database drop logfile group 2;
from instance 2:
alter database drop logfile group 3;
alter database drop logfile group 4;
( Note please check properly before dropping logfile i.e. the status must be
"INACTIVE" for both the logfiles in groups )
Here i have dropped instance 2 logfile groups first after that instance 1.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
check following activity logs:
login as: root
root@192.168.78.51's password:
Last login: Fri Jun 29 13:10:25 2018 from 192.168.78.1
[root@rac1 ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg_rac1-lv_root
27G 14G 12G 54% /
tmpfs 2.0G 711M 1.4G 35% /dev/shm
/dev/sda1 485M 55M 405M 12% /boot
12cR1_softs 430G 330G 101G 77% /media/sf_12cR1_softs
/dev/asm/shared-385 1.0G 144M 881M 14% /SHARED
[root@rac1 ~]#
[root@rac1 ~]#
[root@rac1 ~]#
[root@rac1 ~]#
[root@rac1 ~]#
[root@rac1 ~]#
[root@rac1 ~]#
[root@rac1 ~]# su - oracle
==================================================================
SETTING ENVIRONMENT
1. Grid
2. Database
Enter your choice :
2
[oracle@rac1 ~]$
[oracle@rac1 ~]$
[oracle@rac1 ~]$
[oracle@rac1 ~]$
[oracle@rac1 ~]$sqlplus / as sysdba
SQL*Plus: Release 12.1.0.1.0 Production on Fri Jun 29 14:28:29 2018
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management,
OLAP,
Advanced Analytics and Real Application Testing options
SQL> set echo off
set feedback off
set linesize 120
set pagesize 35
set trim on
set trims on
set lines 120
col group# format 999
col thread# format 999
col member format a70 wrap
col status format a10
col archived format a10
col fsize format 999 heading "Size (MB)"
select l.group#, l.thread#,
f.member,
l.archived,
l.status,
(bytes/1024/1024) fsize
from
v$log l, v$logfile f
where f.group# = l.group#
order by 1,2
/
SQL> SQL> SQL> SQL> SQL> SQL> SQL> SQL> SQL> SQL> SQL> SQL> SQL> SQL> 2 3
4 5 6 7 8 9 10
GROUP# THREAD# MEMBER
ARCHIVED STATUS Size (MB)
------ -------
----------------------------------------------------------------------
---------- ---------- ---------
1 1 +FRA/RAC/ONLINELOG/group_1.263.961580087
YES INACTIVE 50
1 1 +DATA/RAC/ONLINELOG/group_1.281.961580081
YES INACTIVE 50
2 1 +FRA/RAC/ONLINELOG/group_2.264.961580095
NO CURRENT 50
2 1 +DATA/RAC/ONLINELOG/group_2.282.961580091
NO CURRENT 50
3 2 +DATA/RAC/ONLINELOG/group_3.288.961583983
YES INACTIVE 50
3 2 +FRA/RAC/ONLINELOG/group_3.265.961583989
YES INACTIVE 50
4 2 +DATA/RAC/ONLINELOG/group_4.289.961583993
NO CURRENT 50
4 2 +FRA/RAC/ONLINELOG/group_4.266.961583997
NO CURRENT 50
SQL> SQL>
SQL>
SQL>
SQL>
SQL> alter database add logfile thread 1 group 5 ('+DATA','+FRA') size 100M;
SQL>
SQL>
SQL> alter database add logfile thread 1 group 6 ('+DATA','+FRA') size 100M;
SQL>
SQL> alter database add logfile thread 2 group 7 ('+DATA','+FRA') size 100M;
SQL>
SQL> SQL> set timing on
SQL>
SQL> alter database add logfile thread 2 group 8 ('+DATA','+FRA') size 100M;
Elapsed: 00:01:21.18
SQL>
SQL>
SQL> set echo off
set feedback off
set linesize 120
set pagesize 35
set trim on
set trims on
set lines 120
col group# format 999
col thread# format 999
col member format a70 wrap
col status format a10
col archived format a10
col fsize format 999 heading "Size (MB)"
select l.group#, l.thread#,
f.member,
l.archived,
l.status,
(bytes/1024/1024) fsize
from
v$log l, v$logfile f
where f.group# = l.group#
order by 1,2
/SQL> SQL> SQL> SQL> SQL> SQL> SQL> SQL> SQL> SQL> SQL> SQL> SQL> SQL> 2 3
4 5 6 7 8 9 10
GROUP# THREAD# MEMBER
ARCHIVED STATUS Size (MB)
------ -------
----------------------------------------------------------------------
---------- ---------- ---------
1 1 +DATA/RAC/ONLINELOG/group_1.281.961580081
YES INACTIVE 50
1 1 +FRA/RAC/ONLINELOG/group_1.263.961580087
YES INACTIVE 50
2 1 +DATA/RAC/ONLINELOG/group_2.282.961580091
NO CURRENT 50
2 1 +FRA/RAC/ONLINELOG/group_2.264.961580095
NO CURRENT 50
3 2 +DATA/RAC/ONLINELOG/group_3.288.961583983
YES INACTIVE 50
3 2 +FRA/RAC/ONLINELOG/group_3.265.961583989
YES INACTIVE 50
4 2 +DATA/RAC/ONLINELOG/group_4.289.961583993
NO CURRENT 50
4 2 +FRA/RAC/ONLINELOG/group_4.266.961583997
NO CURRENT 50
5 1 +DATA/RAC/ONLINELOG/group_5.298.980087539
YES UNUSED 100
5 1 +FRA/RAC/ONLINELOG/group_5.360.980087597
YES UNUSED 100
6 1 +DATA/RAC/ONLINELOG/group_6.299.980087677
YES UNUSED 100
6 1 +FRA/RAC/ONLINELOG/group_6.361.980087735
YES UNUSED 100
7 2 +DATA/RAC/ONLINELOG/group_7.300.980087819
YES UNUSED 100
7 2 +FRA/RAC/ONLINELOG/group_7.362.980087867
YES UNUSED 100
8 2 +DATA/RAC/ONLINELOG/group_8.301.980088099
YES UNUSED 100
8 2 +FRA/RAC/ONLINELOG/group_8.363.980088139
YES UNUSED 100
Elapsed: 00:00:09.08
SQL>
SQL>
SQL>
SQL> alter system switch logfile;
Elapsed: 00:00:14.14
SQL>
SQL>
SQL> select l.group#, l.thread#,
f.member,
l.archived,
l.status,
(bytes/1024/1024) fsize
from
v$log l, v$logfile f
where f.group# = l.group#
order by 1,2
/ 2 3 4 5 6 7 8 9 10
GROUP# THREAD# MEMBER
ARCHIVED STATUS Size (MB)
------ -------
----------------------------------------------------------------------
---------- ---------- ---------
1 1 +DATA/RAC/ONLINELOG/group_1.281.961580081
YES INACTIVE 50
1 1 +FRA/RAC/ONLINELOG/group_1.263.961580087
YES INACTIVE 50
2 1 +DATA/RAC/ONLINELOG/group_2.282.961580091
NO ACTIVE 50
2 1 +FRA/RAC/ONLINELOG/group_2.264.961580095
NO ACTIVE 50
3 2 +DATA/RAC/ONLINELOG/group_3.288.961583983
YES INACTIVE 50
3 2 +FRA/RAC/ONLINELOG/group_3.265.961583989
YES INACTIVE 50
4 2 +DATA/RAC/ONLINELOG/group_4.289.961583993
NO CURRENT 50
4 2 +FRA/RAC/ONLINELOG/group_4.266.961583997
NO CURRENT 50
5 1 +DATA/RAC/ONLINELOG/group_5.298.980087539
NO CURRENT 100
5 1 +FRA/RAC/ONLINELOG/group_5.360.980087597
NO CURRENT 100
6 1 +DATA/RAC/ONLINELOG/group_6.299.980087677
YES UNUSED 100
6 1 +FRA/RAC/ONLINELOG/group_6.361.980087735
YES UNUSED 100
7 2 +DATA/RAC/ONLINELOG/group_7.300.980087819
YES UNUSED 100
7 2 +FRA/RAC/ONLINELOG/group_7.362.980087867
YES UNUSED 100
8 2 +DATA/RAC/ONLINELOG/group_8.301.980088099
YES UNUSED 100
8 2 +FRA/RAC/ONLINELOG/group_8.363.980088139
YES UNUSED 100
Elapsed: 00:00:17.09
SQL>
SQL> select l.group#, l.thread#, f.member, l.archived, l.status,
(bytes/1024/1024) fsize
from v$log l, v$logfile f where f.group# = l.group#
and l.thread#=1 ; 2 3
GROUP# THREAD# MEMBER
ARCHIVED STATUS Size (MB)
------ -------
----------------------------------------------------------------------
---------- ---------- ---------
2 1 +DATA/RAC/ONLINELOG/group_2.282.961580091
YES ACTIVE 50
2 1 +FRA/RAC/ONLINELOG/group_2.264.961580095
YES ACTIVE 50
1 1 +DATA/RAC/ONLINELOG/group_1.281.961580081
YES INACTIVE 50
1 1 +FRA/RAC/ONLINELOG/group_1.263.961580087
YES INACTIVE 50
5 1 +DATA/RAC/ONLINELOG/group_5.298.980087539
NO CURRENT 100
5 1 +FRA/RAC/ONLINELOG/group_5.360.980087597
NO CURRENT 100
6 1 +DATA/RAC/ONLINELOG/group_6.299.980087677
YES UNUSED 100
6 1 +FRA/RAC/ONLINELOG/group_6.361.980087735
YES UNUSED 100
Elapsed: 00:00:09.42
SQL> alter system switch logfile;
Elapsed: 00:00:05.75
SQL>
SQL> select l.group#, l.thread#, f.member, l.archived, l.status,
(bytes/1024/1024) fsize
from v$log l, v$logfile f where f.group# = l.group#
and l.thread#=1 ; 2 3
GROUP# THREAD# MEMBER
ARCHIVED STATUS Size (MB)
------ -------
----------------------------------------------------------------------
---------- ---------- ---------
2 1 +DATA/RAC/ONLINELOG/group_2.282.961580091
YES ACTIVE 50
2 1 +FRA/RAC/ONLINELOG/group_2.264.961580095
YES ACTIVE 50
1 1 +DATA/RAC/ONLINELOG/group_1.281.961580081
YES INACTIVE 50
1 1 +FRA/RAC/ONLINELOG/group_1.263.961580087
YES INACTIVE 50
5 1 +DATA/RAC/ONLINELOG/group_5.298.980087539
YES ACTIVE 100
5 1 +FRA/RAC/ONLINELOG/group_5.360.980087597
YES ACTIVE 100
6 1 +DATA/RAC/ONLINELOG/group_6.299.980087677
NO CURRENT 100
6 1 +FRA/RAC/ONLINELOG/group_6.361.980087735
NO CURRENT 100
Elapsed: 00:00:13.75
SQL> alter system switch logfile;
Elapsed: 00:00:09.54
SQL>
SQL> select l.group#, l.thread#, f.member, l.archived, l.status,
(bytes/1024/1024) fsize
from v$log l, v$logfile f where f.group# = l.group#
and l.thread#=1 ; 2 3
GROUP# THREAD# MEMBER
ARCHIVED STATUS Size (MB)
------ -------
----------------------------------------------------------------------
---------- ---------- ---------
2 1 +DATA/RAC/ONLINELOG/group_2.282.961580091
YES ACTIVE 50
2 1 +FRA/RAC/ONLINELOG/group_2.264.961580095
YES ACTIVE 50
1 1 +DATA/RAC/ONLINELOG/group_1.281.961580081
NO CURRENT 50
1 1 +FRA/RAC/ONLINELOG/group_1.263.961580087
NO CURRENT 50
5 1 +DATA/RAC/ONLINELOG/group_5.298.980087539
YES ACTIVE 100
5 1 +FRA/RAC/ONLINELOG/group_5.360.980087597
YES ACTIVE 100
6 1 +DATA/RAC/ONLINELOG/group_6.299.980087677
NO ACTIVE 100
6 1 +FRA/RAC/ONLINELOG/group_6.361.980087735
NO ACTIVE 100
Elapsed: 00:00:19.82
SQL>
SQL> alter system switch logfile;
Elapsed: 00:00:42.84
SQL> select l.group#, l.thread#, f.member, l.archived, l.status,
(bytes/1024/1024) fsize
from v$log l, v$logfile f where f.group# = l.group#
and l.thread#=1 ; 2 3
GROUP# THREAD# MEMBER
ARCHIVED STATUS Size (MB)
------ -------
----------------------------------------------------------------------
---------- ---------- ---------
2 1 +DATA/RAC/ONLINELOG/group_2.282.961580091
NO CURRENT 50
2 1 +FRA/RAC/ONLINELOG/group_2.264.961580095
NO CURRENT 50
1 1 +DATA/RAC/ONLINELOG/group_1.281.961580081
NO ACTIVE 50
1 1 +FRA/RAC/ONLINELOG/group_1.263.961580087
NO ACTIVE 50
5 1 +DATA/RAC/ONLINELOG/group_5.298.980087539
YES ACTIVE 100
5 1 +FRA/RAC/ONLINELOG/group_5.360.980087597
YES ACTIVE 100
6 1 +DATA/RAC/ONLINELOG/group_6.299.980087677
YES ACTIVE 100
6 1 +FRA/RAC/ONLINELOG/group_6.361.980087735
YES ACTIVE 100
Elapsed: 00:00:12.23
SQL>
SQL> alter system switch logfile;
Elapsed: 00:00:15.77
SQL>
SQL> select l.group#, l.thread#, f.member, l.archived, l.status,
(bytes/1024/1024) fsize
from v$log l, v$logfile f where f.group# = l.group#
and l.thread#=1 ; 2 3
GROUP# THREAD# MEMBER
ARCHIVED STATUS Size (MB)
------ -------
----------------------------------------------------------------------
---------- ---------- ---------
2 1 +DATA/RAC/ONLINELOG/group_2.282.961580091
NO ACTIVE 50
2 1 +FRA/RAC/ONLINELOG/group_2.264.961580095
NO ACTIVE 50
1 1 +DATA/RAC/ONLINELOG/group_1.281.961580081
YES ACTIVE 50
1 1 +FRA/RAC/ONLINELOG/group_1.263.961580087
YES ACTIVE 50
5 1 +DATA/RAC/ONLINELOG/group_5.298.980087539
NO CURRENT 100
5 1 +FRA/RAC/ONLINELOG/group_5.360.980087597
NO CURRENT 100
6 1 +DATA/RAC/ONLINELOG/group_6.299.980087677
YES ACTIVE 100
6 1 +FRA/RAC/ONLINELOG/group_6.361.980087735
YES ACTIVE 100
Elapsed: 00:00:13.55
SQL>
SQL>
SQL>
SQL>
SQL> alter system switch logfile;
Elapsed: 00:00:00.50
SQL>
SQL> select l.group#, l.thread#, f.member, l.archived, l.status,
(bytes/1024/1024) fsize
from v$log l, v$logfile f where f.group# = l.group#
and l.thread#=1 ; 2 3
GROUP# THREAD# MEMBER
ARCHIVED STATUS Size (MB)
------ -------
----------------------------------------------------------------------
---------- ---------- ---------
2 1 +DATA/RAC/ONLINELOG/group_2.282.961580091
YES INACTIVE 50
2 1 +FRA/RAC/ONLINELOG/group_2.264.961580095
YES INACTIVE 50
1 1 +DATA/RAC/ONLINELOG/group_1.281.961580081
YES INACTIVE 50
1 1 +FRA/RAC/ONLINELOG/group_1.263.961580087
YES INACTIVE 50
5 1 +DATA/RAC/ONLINELOG/group_5.298.980087539
YES ACTIVE 100
5 1 +FRA/RAC/ONLINELOG/group_5.360.980087597
YES ACTIVE 100
6 1 +DATA/RAC/ONLINELOG/group_6.299.980087677
NO CURRENT 100
6 1 +FRA/RAC/ONLINELOG/group_6.361.980087735
NO CURRENT 100
Elapsed: 00:00:00.17
SQL>
SQL> alter database drop logfile group 1;
Elapsed: 00:00:01.87
SQL> alter database drop logfile group 2;
Elapsed: 00:00:01.22
SQL>
SQL>
SQL>
SQL> select l.group#, l.thread#, f.member, l.archived, l.status,
(bytes/1024/1024) fsize
from v$log l, v$logfile f where f.group# = l.group#
and l.thread#=1 ; 2 3
GROUP# THREAD# MEMBER
ARCHIVED STATUS Size (MB)
------ -------
----------------------------------------------------------------------
---------- ---------- ---------
5 1 +DATA/RAC/ONLINELOG/group_5.298.980087539
YES ACTIVE 100
5 1 +FRA/RAC/ONLINELOG/group_5.360.980087597
YES ACTIVE 100
6 1 +DATA/RAC/ONLINELOG/group_6.299.980087677
NO CURRENT 100
6 1 +FRA/RAC/ONLINELOG/group_6.361.980087735
NO CURRENT 100
Elapsed: 00:00:00.20
SQL>
SQL>
SQL> select l.group#, l.thread#,
f.member,
l.archived,
l.status,
(bytes/1024/1024) fsize
from
v$log l, v$logfile f
where f.group# = l.group#
order by 1,2
/ 2 3 4 5 6 7 8 9 10
GROUP# THREAD# MEMBER
ARCHIVED STATUS Size (MB)
------ -------
----------------------------------------------------------------------
---------- ---------- ---------
5 1 +DATA/RAC/ONLINELOG/group_5.298.980087539
YES ACTIVE 100
5 1 +FRA/RAC/ONLINELOG/group_5.360.980087597
YES ACTIVE 100
6 1 +DATA/RAC/ONLINELOG/group_6.299.980087677
NO CURRENT 100
6 1 +FRA/RAC/ONLINELOG/group_6.361.980087735
NO CURRENT 100
7 2 +DATA/RAC/ONLINELOG/group_7.300.980087819
YES ACTIVE 100
7 2 +FRA/RAC/ONLINELOG/group_7.362.980087867
YES ACTIVE 100
8 2 +DATA/RAC/ONLINELOG/group_8.301.980088099
NO CURRENT 100
8 2 +FRA/RAC/ONLINELOG/group_8.363.980088139
NO CURRENT 100
Elapsed: 00:00:00.19
SQL>
SQL>
SQL>
SQL>
SQL>
SQL>
SQL> exit
Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 -
64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management,
OLAP,
Advanced Analytics and Real Application Testing options
[oracle@rac1 ~]$
````````````````````````````````````
login as: root
root@192.168.78.52's password:
Last login: Fri Jun 29 13:11:41 2018 from 192.168.78.1
[root@rac2 ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg_rac1-lv_root
27G 14G 12G 53% /
tmpfs 2.0G 638M 1.4G 32% /dev/shm
/dev/sda1 485M 55M 405M 12% /boot
12cR1_softs 430G 330G 101G 77% /media/sf_12cR1_softs
/dev/asm/shared-385 1.0G 144M 881M 14% /SHARED
[root@rac2 ~]#
[root@rac2 ~]#
[root@rac2 ~]#
[root@rac2 ~]# su - oracle
==================================================================
SETTING ENVIRONMENT
1. Grid
2. Database
Enter your choice :
2
[oracle@rac2 ~]$sqlplus / as sysdba
SQL*Plus: Release 12.1.0.1.0 Production on Fri Jun 29 14:44:12 2018
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management,
OLAP,
Advanced Analytics and Real Application Testing options
SQL> set timing on
SQL> set lines 200 pages 200
SQL> SQL> SQL>
SQL>
SQL>
SQL> select l.group#, l.thread#, f.member, l.archived, l.status,
(bytes/1024/1024) fsize
from v$log l, v$logfile f where f.group# = l.group#
and l.thread#=2 ;
2 3
GROUP# THREAD#
---------- ----------
MEMBER
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
----------------------------------------
ARC STATUS FSIZE
--- ---------------- ----------
3 2
+DATA/RAC/ONLINELOG/group_3.288.961583983
YES INACTIVE 50
3 2
+FRA/RAC/ONLINELOG/group_3.265.961583989
YES INACTIVE 50
4 2
+DATA/RAC/ONLINELOG/group_4.289.961583993
YES ACTIVE 50
4 2
+FRA/RAC/ONLINELOG/group_4.266.961583997
YES ACTIVE 50
7 2
+DATA/RAC/ONLINELOG/group_7.300.980087819
NO CURRENT 100
7 2
+FRA/RAC/ONLINELOG/group_7.362.980087867
NO CURRENT 100
8 2
+DATA/RAC/ONLINELOG/group_8.301.980088099
YES UNUSED 100
8 2
+FRA/RAC/ONLINELOG/group_8.363.980088139
YES UNUSED 100
8 rows selected.
Elapsed: 00:00:42.39
SQL> SQL> SQL> SQL> SQL> SQL> SQL> SQL> SQL> SQL> set echo off
set feedback off
set linesize 120
set pagesize 35
set trim on
set trims on
set lines 120
col group# format 999
col thread# format 999
col member format a70 wrap
col status format a10
col archived format a10
SQL> SQL> col fsize format 999 heading "Size (MB)"SQL> SQL> SQL> SQL> SQL> SQL>
SQL> SQL> SQL> SQL>
SQL> /
GROUP# THREAD# MEMBER
ARCHIVED STATUS Size (MB)
------ -------
----------------------------------------------------------------------
---------- ---------- ---------
3 2 +DATA/RAC/ONLINELOG/group_3.288.961583983
YES INACTIVE 50
3 2 +FRA/RAC/ONLINELOG/group_3.265.961583989
YES INACTIVE 50
4 2 +DATA/RAC/ONLINELOG/group_4.289.961583993
YES ACTIVE 50
4 2 +FRA/RAC/ONLINELOG/group_4.266.961583997
YES ACTIVE 50
7 2 +DATA/RAC/ONLINELOG/group_7.300.980087819
NO CURRENT 100
7 2 +FRA/RAC/ONLINELOG/group_7.362.980087867
NO CURRENT 100
8 2 +DATA/RAC/ONLINELOG/group_8.301.980088099
YES UNUSED 100
8 2 +FRA/RAC/ONLINELOG/group_8.363.980088139
YES UNUSED 100
Elapsed: 00:00:08.54
SQL>
SQL> alter system switch logfile;
Elapsed: 00:00:06.88
SQL>
SQL> select l.group#, l.thread#, f.member, l.archived, l.status,
(bytes/1024/1024) fsize
from v$log l, v$logfile f where f.group# = l.group#
and l.thread#=2 ; 2 3
GROUP# THREAD# MEMBER
ARCHIVED STATUS Size (MB)
------ -------
----------------------------------------------------------------------
---------- ---------- ---------
3 2 +DATA/RAC/ONLINELOG/group_3.288.961583983
YES INACTIVE 50
3 2 +FRA/RAC/ONLINELOG/group_3.265.961583989
YES INACTIVE 50
4 2 +DATA/RAC/ONLINELOG/group_4.289.961583993
YES INACTIVE 50
4 2 +FRA/RAC/ONLINELOG/group_4.266.961583997
YES INACTIVE 50
7 2 +DATA/RAC/ONLINELOG/group_7.300.980087819
YES ACTIVE 100
7 2 +FRA/RAC/ONLINELOG/group_7.362.980087867
YES ACTIVE 100
8 2 +DATA/RAC/ONLINELOG/group_8.301.980088099
NO CURRENT 100
8 2 +FRA/RAC/ONLINELOG/group_8.363.980088139
NO CURRENT 100
Elapsed: 00:00:09.10
SQL>
SQL>
SQL> alter database drop logfile group 3;
Elapsed: 00:00:10.56
SQL>
SQL> alter database drop logfile group 4;
Elapsed: 00:00:03.52
SQL>
SQL> select l.group#, l.thread#, f.member, l.archived, l.status,
(bytes/1024/1024) fsize
from v$log l, v$logfile f where f.group# = l.group#
and l.thread#=2 ; 2 3
GROUP# THREAD# MEMBER
ARCHIVED STATUS Size (MB)
------ -------
----------------------------------------------------------------------
---------- ---------- ---------
7 2 +DATA/RAC/ONLINELOG/group_7.300.980087819
YES ACTIVE 100
7 2 +FRA/RAC/ONLINELOG/group_7.362.980087867
YES ACTIVE 100
8 2 +DATA/RAC/ONLINELOG/group_8.301.980088099
NO CURRENT 100
8 2 +FRA/RAC/ONLINELOG/group_8.363.980088139
NO CURRENT 100
Elapsed: 00:00:00.71
SQL>
SQL>
SQL>
SQL> exit
Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 -
64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management,
OLAP,
Advanced Analytics and Real Application Testing options
[oracle@rac2 ~]$

More Related Content

PDF
ANSI vs Oracle language
DOCX
Oracle 12c far sync standby instance
PDF
Sangam 19 - Analytic SQL
TXT
Quick reference for mongo shell commands
PDF
PostgreSQL Portland Performance Practice Project - Database Test 2 Tuning
DOC
Upgrade 10204-to-10205 on-2-node_rac_linux_x86_64_detail-steps_v0.1
PDF
Autoextend
PDF
Contiguous
ANSI vs Oracle language
Oracle 12c far sync standby instance
Sangam 19 - Analytic SQL
Quick reference for mongo shell commands
PostgreSQL Portland Performance Practice Project - Database Test 2 Tuning
Upgrade 10204-to-10205 on-2-node_rac_linux_x86_64_detail-steps_v0.1
Autoextend
Contiguous

What's hot (20)

DOCX
Asm disk group migration from
PDF
Latin America Tour 2019 - 10 great sql features
PDF
How to create a pluggable database by cloning an existing local pdb
TXT
Backup and restore router configuration
ODP
Pro PostgreSQL
PDF
KScope19 - SQL Features
PDF
Install and upgrade Oracle grid infrastructure 12.1.0.2
PDF
PostgreSQL Portland Performance Practice Project - Database Test 2 Howto
PPTX
Get your moneys worth out of your database
DOCX
Moving 12c database from NON-ASM to ASM
PDF
Complex stories about Sqooping PostgreSQL data
PDF
12c for Developers - Feb 2014
PDF
Install tomcat 5.5 in debian os and deploy war file
PPTX
SQL techniques for faster applications
PPT
PDF
Oracle12c For Developers
PDF
Embedded R Execution using SQL
PPTX
DB2 Basic Commands - UDB
ODP
The overview of raid10
PDF
Lost without a trace
Asm disk group migration from
Latin America Tour 2019 - 10 great sql features
How to create a pluggable database by cloning an existing local pdb
Backup and restore router configuration
Pro PostgreSQL
KScope19 - SQL Features
Install and upgrade Oracle grid infrastructure 12.1.0.2
PostgreSQL Portland Performance Practice Project - Database Test 2 Howto
Get your moneys worth out of your database
Moving 12c database from NON-ASM to ASM
Complex stories about Sqooping PostgreSQL data
12c for Developers - Feb 2014
Install tomcat 5.5 in debian os and deploy war file
SQL techniques for faster applications
Oracle12c For Developers
Embedded R Execution using SQL
DB2 Basic Commands - UDB
The overview of raid10
Lost without a trace
Ad

Similar to Redo logfile addition in oracle rac 12c (20)

PPT
Oracle 10g Performance: chapter 00 sampling
PDF
Dataguard physical stand by setup
PPT
Oracle Open World Thursday 230 ashmasters
PPT
Ash masters : advanced ash analytics on Oracle
KEY
Perf Tuning Short
PDF
Oracle-DBA-Interview-Question- For experience DBA
PDF
MySQL Server Settings Tuning
PDF
rac_for_beginners_ppt.pdf
PDF
Percona Toolkit for Effective MySQL Administration
PPT
Ms sql server architecture
PDF
Frits Hoogland - About multiblock reads
PDF
Ugif 10 2012 beauty ofifmxdiskstructs ugif
PDF
MySQL performance webinar
TXT
mysql cluster测试记录 - 20120905
PDF
GLOC 2014 NEOOUG - Oracle Database 12c New Features
PDF
Highload Perf Tuning
PDF
Loadays MySQL
PDF
PDF
qdoc.tips_oracle-dba-interview-questions.pdf
TXT
Oracle11g notes
Oracle 10g Performance: chapter 00 sampling
Dataguard physical stand by setup
Oracle Open World Thursday 230 ashmasters
Ash masters : advanced ash analytics on Oracle
Perf Tuning Short
Oracle-DBA-Interview-Question- For experience DBA
MySQL Server Settings Tuning
rac_for_beginners_ppt.pdf
Percona Toolkit for Effective MySQL Administration
Ms sql server architecture
Frits Hoogland - About multiblock reads
Ugif 10 2012 beauty ofifmxdiskstructs ugif
MySQL performance webinar
mysql cluster测试记录 - 20120905
GLOC 2014 NEOOUG - Oracle Database 12c New Features
Highload Perf Tuning
Loadays MySQL
qdoc.tips_oracle-dba-interview-questions.pdf
Oracle11g notes
Ad

Recently uploaded (20)

PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Encapsulation theory and applications.pdf
PDF
Review of recent advances in non-invasive hemoglobin estimation
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Machine learning based COVID-19 study performance prediction
PDF
Network Security Unit 5.pdf for BCA BBA.
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
KodekX | Application Modernization Development
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
NewMind AI Weekly Chronicles - August'25 Week I
Per capita expenditure prediction using model stacking based on satellite ima...
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Dropbox Q2 2025 Financial Results & Investor Presentation
Advanced methodologies resolving dimensionality complications for autism neur...
Encapsulation theory and applications.pdf
Review of recent advances in non-invasive hemoglobin estimation
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Machine learning based COVID-19 study performance prediction
Network Security Unit 5.pdf for BCA BBA.
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
MIND Revenue Release Quarter 2 2025 Press Release
Building Integrated photovoltaic BIPV_UPV.pdf
Digital-Transformation-Roadmap-for-Companies.pptx
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
20250228 LYD VKU AI Blended-Learning.pptx
KodekX | Application Modernization Development
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
How UI/UX Design Impacts User Retention in Mobile Apps.pdf

Redo logfile addition in oracle rac 12c

  • 1. REDO LOGFILE ADD ACTIVITY IN RAC 11gR2: ``````````````````````````````````````` first check logfiles: ``````````````````` query: set echo off set feedback off set linesize 120 set pagesize 35 set trim on set trims on set lines 120 col group# format 999 col thread# format 999 col member format a70 wrap col status format a10 col archived format a10 col fsize format 999 heading "Size (MB)" select l.group#, l.thread#, f.member, l.archived, l.status, (bytes/1024/1024) fsize from v$log l, v$logfile f where f.group# = l.group# order by 1,2 / GROUP# THREAD# MEMBER ARCHIVED STATUS Size (MB) ------ ------- ---------------------------------------------------------------------- ---------- ---------- --------- 1 1 +DATA/RAC/ONLINELOG/group_1.281.961580081 YES INACTIVE 50 1 1 +FRA/RAC/ONLINELOG/group_1.263.961580087 YES INACTIVE 50 2 1 +DATA/RAC/ONLINELOG/group_2.282.961580091 NO CURRENT 50 2 1 +FRA/RAC/ONLINELOG/group_2.264.961580095 NO CURRENT 50 3 2 +DATA/RAC/ONLINELOG/group_3.288.961583983 YES INACTIVE 50 3 2 +FRA/RAC/ONLINELOG/group_3.265.961583989 YES INACTIVE 50 4 2 +DATA/RAC/ONLINELOG/group_4.289.961583993 NO CURRENT 50 4 2 +FRA/RAC/ONLINELOG/group_4.266.961583997 NO CURRENT 50 We will add new logfiles in thread 1 and 2 of size 100M. So we can observe here thread 1 having two groups i.e. group 1&2, similarly thread 2 having two groups i.e. group 3&4 of logfile size 50M. Now we'll add two new groups for thread 1 ( group 5&6) & for thread 2 (group
  • 2. 7&8) respectively. alter database add logfile thread 1 group 5 ('+DATA','+FRA') size 100M; alter database add logfile thread 1 group 6 ('+DATA','+FRA') size 100M; alter database add logfile thread 2 group 7 ('+DATA','+FRA') size 100M; alter database add logfile thread 2 group 8 ('+DATA','+FRA') size 100M; After that please check logfiles being added or not: select l.group#, l.thread#, f.member, l.archived, l.status, (bytes/1024/1024) fsize from v$log l, v$logfile f where f.group# = l.group# order by 1,2 / GROUP# THREAD# MEMBER ARCHIVED STATUS Size (MB) ------ ------- ---------------------------------------------------------------------- ---------- ---------- --------- 1 1 +DATA/RAC/ONLINELOG/group_1.281.961580081 YES INACTIVE 50 1 1 +FRA/RAC/ONLINELOG/group_1.263.961580087 YES INACTIVE 50 2 1 +DATA/RAC/ONLINELOG/group_2.282.961580091 NO CURRENT 50 2 1 +FRA/RAC/ONLINELOG/group_2.264.961580095 NO CURRENT 50 3 2 +DATA/RAC/ONLINELOG/group_3.288.961583983 YES INACTIVE 50 3 2 +FRA/RAC/ONLINELOG/group_3.265.961583989 YES INACTIVE 50 4 2 +DATA/RAC/ONLINELOG/group_4.289.961583993 NO CURRENT 50 4 2 +FRA/RAC/ONLINELOG/group_4.266.961583997 NO CURRENT 50 5 1 +DATA/RAC/ONLINELOG/group_5.298.980087539 YES UNUSED 100 5 1 +FRA/RAC/ONLINELOG/group_5.360.980087597 YES UNUSED 100 6 1 +DATA/RAC/ONLINELOG/group_6.299.980087677 YES UNUSED 100 6 1 +FRA/RAC/ONLINELOG/group_6.361.980087735 YES UNUSED 100 7 2 +DATA/RAC/ONLINELOG/group_7.300.980087819 YES UNUSED 100 7 2 +FRA/RAC/ONLINELOG/group_7.362.980087867 YES UNUSED 100 8 2 +DATA/RAC/ONLINELOG/group_8.301.980088099 YES UNUSED 100 8 2 +FRA/RAC/ONLINELOG/group_8.363.980088139 YES UNUSED 100 Elapsed: 00:00:09.08 Now we will login both the nodes with different putty session and will run " alter system swith logfile; " until thread 1 & 2 groups get switched and the 50M logfile get inactive
  • 3. respectively. alter system switch logfile; select l.group#, l.thread#, f.member, l.archived, l.status, (bytes/1024/1024) fsize from v$log l, v$logfile f where f.group# = l.group# and l.thread#=1 ; alter system switch logfile; select l.group#, l.thread#, f.member, l.archived, l.status, (bytes/1024/1024) fsize from v$log l, v$logfile f where f.group# = l.group# and l.thread#=2 ; Then we can drop inactive groups for thread 1 & 2: from instance 1: alter database drop logfile group 1; alter database drop logfile group 2; from instance 2: alter database drop logfile group 3; alter database drop logfile group 4; ( Note please check properly before dropping logfile i.e. the status must be "INACTIVE" for both the logfiles in groups ) Here i have dropped instance 2 logfile groups first after that instance 1. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ check following activity logs: login as: root root@192.168.78.51's password: Last login: Fri Jun 29 13:10:25 2018 from 192.168.78.1 [root@rac1 ~]# df -h Filesystem Size Used Avail Use% Mounted on /dev/mapper/vg_rac1-lv_root 27G 14G 12G 54% / tmpfs 2.0G 711M 1.4G 35% /dev/shm /dev/sda1 485M 55M 405M 12% /boot 12cR1_softs 430G 330G 101G 77% /media/sf_12cR1_softs /dev/asm/shared-385 1.0G 144M 881M 14% /SHARED [root@rac1 ~]# [root@rac1 ~]# [root@rac1 ~]# [root@rac1 ~]# [root@rac1 ~]# [root@rac1 ~]# [root@rac1 ~]# [root@rac1 ~]# su - oracle ================================================================== SETTING ENVIRONMENT 1. Grid 2. Database Enter your choice : 2 [oracle@rac1 ~]$ [oracle@rac1 ~]$
  • 4. [oracle@rac1 ~]$ [oracle@rac1 ~]$ [oracle@rac1 ~]$sqlplus / as sysdba SQL*Plus: Release 12.1.0.1.0 Production on Fri Jun 29 14:28:29 2018 Copyright (c) 1982, 2013, Oracle. All rights reserved. Connected to: Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP, Advanced Analytics and Real Application Testing options SQL> set echo off set feedback off set linesize 120 set pagesize 35 set trim on set trims on set lines 120 col group# format 999 col thread# format 999 col member format a70 wrap col status format a10 col archived format a10 col fsize format 999 heading "Size (MB)" select l.group#, l.thread#, f.member, l.archived, l.status, (bytes/1024/1024) fsize from v$log l, v$logfile f where f.group# = l.group# order by 1,2 / SQL> SQL> SQL> SQL> SQL> SQL> SQL> SQL> SQL> SQL> SQL> SQL> SQL> SQL> 2 3 4 5 6 7 8 9 10 GROUP# THREAD# MEMBER ARCHIVED STATUS Size (MB) ------ ------- ---------------------------------------------------------------------- ---------- ---------- --------- 1 1 +FRA/RAC/ONLINELOG/group_1.263.961580087 YES INACTIVE 50 1 1 +DATA/RAC/ONLINELOG/group_1.281.961580081 YES INACTIVE 50 2 1 +FRA/RAC/ONLINELOG/group_2.264.961580095 NO CURRENT 50 2 1 +DATA/RAC/ONLINELOG/group_2.282.961580091 NO CURRENT 50 3 2 +DATA/RAC/ONLINELOG/group_3.288.961583983 YES INACTIVE 50 3 2 +FRA/RAC/ONLINELOG/group_3.265.961583989 YES INACTIVE 50 4 2 +DATA/RAC/ONLINELOG/group_4.289.961583993 NO CURRENT 50 4 2 +FRA/RAC/ONLINELOG/group_4.266.961583997 NO CURRENT 50 SQL> SQL>
  • 5. SQL> SQL> SQL> SQL> alter database add logfile thread 1 group 5 ('+DATA','+FRA') size 100M; SQL> SQL> SQL> alter database add logfile thread 1 group 6 ('+DATA','+FRA') size 100M; SQL> SQL> alter database add logfile thread 2 group 7 ('+DATA','+FRA') size 100M; SQL> SQL> SQL> set timing on SQL> SQL> alter database add logfile thread 2 group 8 ('+DATA','+FRA') size 100M; Elapsed: 00:01:21.18 SQL> SQL> SQL> set echo off set feedback off set linesize 120 set pagesize 35 set trim on set trims on set lines 120 col group# format 999 col thread# format 999 col member format a70 wrap col status format a10 col archived format a10 col fsize format 999 heading "Size (MB)" select l.group#, l.thread#, f.member, l.archived, l.status, (bytes/1024/1024) fsize from v$log l, v$logfile f where f.group# = l.group# order by 1,2 /SQL> SQL> SQL> SQL> SQL> SQL> SQL> SQL> SQL> SQL> SQL> SQL> SQL> SQL> 2 3 4 5 6 7 8 9 10 GROUP# THREAD# MEMBER ARCHIVED STATUS Size (MB) ------ ------- ---------------------------------------------------------------------- ---------- ---------- --------- 1 1 +DATA/RAC/ONLINELOG/group_1.281.961580081 YES INACTIVE 50 1 1 +FRA/RAC/ONLINELOG/group_1.263.961580087 YES INACTIVE 50 2 1 +DATA/RAC/ONLINELOG/group_2.282.961580091 NO CURRENT 50 2 1 +FRA/RAC/ONLINELOG/group_2.264.961580095 NO CURRENT 50 3 2 +DATA/RAC/ONLINELOG/group_3.288.961583983 YES INACTIVE 50 3 2 +FRA/RAC/ONLINELOG/group_3.265.961583989 YES INACTIVE 50 4 2 +DATA/RAC/ONLINELOG/group_4.289.961583993 NO CURRENT 50 4 2 +FRA/RAC/ONLINELOG/group_4.266.961583997 NO CURRENT 50
  • 6. 5 1 +DATA/RAC/ONLINELOG/group_5.298.980087539 YES UNUSED 100 5 1 +FRA/RAC/ONLINELOG/group_5.360.980087597 YES UNUSED 100 6 1 +DATA/RAC/ONLINELOG/group_6.299.980087677 YES UNUSED 100 6 1 +FRA/RAC/ONLINELOG/group_6.361.980087735 YES UNUSED 100 7 2 +DATA/RAC/ONLINELOG/group_7.300.980087819 YES UNUSED 100 7 2 +FRA/RAC/ONLINELOG/group_7.362.980087867 YES UNUSED 100 8 2 +DATA/RAC/ONLINELOG/group_8.301.980088099 YES UNUSED 100 8 2 +FRA/RAC/ONLINELOG/group_8.363.980088139 YES UNUSED 100 Elapsed: 00:00:09.08 SQL> SQL> SQL> SQL> alter system switch logfile; Elapsed: 00:00:14.14 SQL> SQL> SQL> select l.group#, l.thread#, f.member, l.archived, l.status, (bytes/1024/1024) fsize from v$log l, v$logfile f where f.group# = l.group# order by 1,2 / 2 3 4 5 6 7 8 9 10 GROUP# THREAD# MEMBER ARCHIVED STATUS Size (MB) ------ ------- ---------------------------------------------------------------------- ---------- ---------- --------- 1 1 +DATA/RAC/ONLINELOG/group_1.281.961580081 YES INACTIVE 50 1 1 +FRA/RAC/ONLINELOG/group_1.263.961580087 YES INACTIVE 50 2 1 +DATA/RAC/ONLINELOG/group_2.282.961580091 NO ACTIVE 50 2 1 +FRA/RAC/ONLINELOG/group_2.264.961580095 NO ACTIVE 50 3 2 +DATA/RAC/ONLINELOG/group_3.288.961583983 YES INACTIVE 50 3 2 +FRA/RAC/ONLINELOG/group_3.265.961583989 YES INACTIVE 50 4 2 +DATA/RAC/ONLINELOG/group_4.289.961583993 NO CURRENT 50 4 2 +FRA/RAC/ONLINELOG/group_4.266.961583997 NO CURRENT 50 5 1 +DATA/RAC/ONLINELOG/group_5.298.980087539 NO CURRENT 100 5 1 +FRA/RAC/ONLINELOG/group_5.360.980087597 NO CURRENT 100 6 1 +DATA/RAC/ONLINELOG/group_6.299.980087677 YES UNUSED 100 6 1 +FRA/RAC/ONLINELOG/group_6.361.980087735 YES UNUSED 100
  • 7. 7 2 +DATA/RAC/ONLINELOG/group_7.300.980087819 YES UNUSED 100 7 2 +FRA/RAC/ONLINELOG/group_7.362.980087867 YES UNUSED 100 8 2 +DATA/RAC/ONLINELOG/group_8.301.980088099 YES UNUSED 100 8 2 +FRA/RAC/ONLINELOG/group_8.363.980088139 YES UNUSED 100 Elapsed: 00:00:17.09 SQL> SQL> select l.group#, l.thread#, f.member, l.archived, l.status, (bytes/1024/1024) fsize from v$log l, v$logfile f where f.group# = l.group# and l.thread#=1 ; 2 3 GROUP# THREAD# MEMBER ARCHIVED STATUS Size (MB) ------ ------- ---------------------------------------------------------------------- ---------- ---------- --------- 2 1 +DATA/RAC/ONLINELOG/group_2.282.961580091 YES ACTIVE 50 2 1 +FRA/RAC/ONLINELOG/group_2.264.961580095 YES ACTIVE 50 1 1 +DATA/RAC/ONLINELOG/group_1.281.961580081 YES INACTIVE 50 1 1 +FRA/RAC/ONLINELOG/group_1.263.961580087 YES INACTIVE 50 5 1 +DATA/RAC/ONLINELOG/group_5.298.980087539 NO CURRENT 100 5 1 +FRA/RAC/ONLINELOG/group_5.360.980087597 NO CURRENT 100 6 1 +DATA/RAC/ONLINELOG/group_6.299.980087677 YES UNUSED 100 6 1 +FRA/RAC/ONLINELOG/group_6.361.980087735 YES UNUSED 100 Elapsed: 00:00:09.42 SQL> alter system switch logfile; Elapsed: 00:00:05.75 SQL> SQL> select l.group#, l.thread#, f.member, l.archived, l.status, (bytes/1024/1024) fsize from v$log l, v$logfile f where f.group# = l.group# and l.thread#=1 ; 2 3 GROUP# THREAD# MEMBER ARCHIVED STATUS Size (MB) ------ ------- ---------------------------------------------------------------------- ---------- ---------- --------- 2 1 +DATA/RAC/ONLINELOG/group_2.282.961580091 YES ACTIVE 50 2 1 +FRA/RAC/ONLINELOG/group_2.264.961580095 YES ACTIVE 50 1 1 +DATA/RAC/ONLINELOG/group_1.281.961580081 YES INACTIVE 50 1 1 +FRA/RAC/ONLINELOG/group_1.263.961580087 YES INACTIVE 50 5 1 +DATA/RAC/ONLINELOG/group_5.298.980087539 YES ACTIVE 100 5 1 +FRA/RAC/ONLINELOG/group_5.360.980087597 YES ACTIVE 100 6 1 +DATA/RAC/ONLINELOG/group_6.299.980087677 NO CURRENT 100
  • 8. 6 1 +FRA/RAC/ONLINELOG/group_6.361.980087735 NO CURRENT 100 Elapsed: 00:00:13.75 SQL> alter system switch logfile; Elapsed: 00:00:09.54 SQL> SQL> select l.group#, l.thread#, f.member, l.archived, l.status, (bytes/1024/1024) fsize from v$log l, v$logfile f where f.group# = l.group# and l.thread#=1 ; 2 3 GROUP# THREAD# MEMBER ARCHIVED STATUS Size (MB) ------ ------- ---------------------------------------------------------------------- ---------- ---------- --------- 2 1 +DATA/RAC/ONLINELOG/group_2.282.961580091 YES ACTIVE 50 2 1 +FRA/RAC/ONLINELOG/group_2.264.961580095 YES ACTIVE 50 1 1 +DATA/RAC/ONLINELOG/group_1.281.961580081 NO CURRENT 50 1 1 +FRA/RAC/ONLINELOG/group_1.263.961580087 NO CURRENT 50 5 1 +DATA/RAC/ONLINELOG/group_5.298.980087539 YES ACTIVE 100 5 1 +FRA/RAC/ONLINELOG/group_5.360.980087597 YES ACTIVE 100 6 1 +DATA/RAC/ONLINELOG/group_6.299.980087677 NO ACTIVE 100 6 1 +FRA/RAC/ONLINELOG/group_6.361.980087735 NO ACTIVE 100 Elapsed: 00:00:19.82 SQL> SQL> alter system switch logfile; Elapsed: 00:00:42.84 SQL> select l.group#, l.thread#, f.member, l.archived, l.status, (bytes/1024/1024) fsize from v$log l, v$logfile f where f.group# = l.group# and l.thread#=1 ; 2 3 GROUP# THREAD# MEMBER ARCHIVED STATUS Size (MB) ------ ------- ---------------------------------------------------------------------- ---------- ---------- --------- 2 1 +DATA/RAC/ONLINELOG/group_2.282.961580091 NO CURRENT 50 2 1 +FRA/RAC/ONLINELOG/group_2.264.961580095 NO CURRENT 50 1 1 +DATA/RAC/ONLINELOG/group_1.281.961580081 NO ACTIVE 50 1 1 +FRA/RAC/ONLINELOG/group_1.263.961580087 NO ACTIVE 50 5 1 +DATA/RAC/ONLINELOG/group_5.298.980087539 YES ACTIVE 100 5 1 +FRA/RAC/ONLINELOG/group_5.360.980087597 YES ACTIVE 100 6 1 +DATA/RAC/ONLINELOG/group_6.299.980087677 YES ACTIVE 100 6 1 +FRA/RAC/ONLINELOG/group_6.361.980087735 YES ACTIVE 100 Elapsed: 00:00:12.23 SQL>
  • 9. SQL> alter system switch logfile; Elapsed: 00:00:15.77 SQL> SQL> select l.group#, l.thread#, f.member, l.archived, l.status, (bytes/1024/1024) fsize from v$log l, v$logfile f where f.group# = l.group# and l.thread#=1 ; 2 3 GROUP# THREAD# MEMBER ARCHIVED STATUS Size (MB) ------ ------- ---------------------------------------------------------------------- ---------- ---------- --------- 2 1 +DATA/RAC/ONLINELOG/group_2.282.961580091 NO ACTIVE 50 2 1 +FRA/RAC/ONLINELOG/group_2.264.961580095 NO ACTIVE 50 1 1 +DATA/RAC/ONLINELOG/group_1.281.961580081 YES ACTIVE 50 1 1 +FRA/RAC/ONLINELOG/group_1.263.961580087 YES ACTIVE 50 5 1 +DATA/RAC/ONLINELOG/group_5.298.980087539 NO CURRENT 100 5 1 +FRA/RAC/ONLINELOG/group_5.360.980087597 NO CURRENT 100 6 1 +DATA/RAC/ONLINELOG/group_6.299.980087677 YES ACTIVE 100 6 1 +FRA/RAC/ONLINELOG/group_6.361.980087735 YES ACTIVE 100 Elapsed: 00:00:13.55 SQL> SQL> SQL> SQL> SQL> alter system switch logfile; Elapsed: 00:00:00.50 SQL> SQL> select l.group#, l.thread#, f.member, l.archived, l.status, (bytes/1024/1024) fsize from v$log l, v$logfile f where f.group# = l.group# and l.thread#=1 ; 2 3 GROUP# THREAD# MEMBER ARCHIVED STATUS Size (MB) ------ ------- ---------------------------------------------------------------------- ---------- ---------- --------- 2 1 +DATA/RAC/ONLINELOG/group_2.282.961580091 YES INACTIVE 50 2 1 +FRA/RAC/ONLINELOG/group_2.264.961580095 YES INACTIVE 50 1 1 +DATA/RAC/ONLINELOG/group_1.281.961580081 YES INACTIVE 50 1 1 +FRA/RAC/ONLINELOG/group_1.263.961580087 YES INACTIVE 50 5 1 +DATA/RAC/ONLINELOG/group_5.298.980087539 YES ACTIVE 100 5 1 +FRA/RAC/ONLINELOG/group_5.360.980087597 YES ACTIVE 100 6 1 +DATA/RAC/ONLINELOG/group_6.299.980087677 NO CURRENT 100 6 1 +FRA/RAC/ONLINELOG/group_6.361.980087735 NO CURRENT 100 Elapsed: 00:00:00.17
  • 10. SQL> SQL> alter database drop logfile group 1; Elapsed: 00:00:01.87 SQL> alter database drop logfile group 2; Elapsed: 00:00:01.22 SQL> SQL> SQL> SQL> select l.group#, l.thread#, f.member, l.archived, l.status, (bytes/1024/1024) fsize from v$log l, v$logfile f where f.group# = l.group# and l.thread#=1 ; 2 3 GROUP# THREAD# MEMBER ARCHIVED STATUS Size (MB) ------ ------- ---------------------------------------------------------------------- ---------- ---------- --------- 5 1 +DATA/RAC/ONLINELOG/group_5.298.980087539 YES ACTIVE 100 5 1 +FRA/RAC/ONLINELOG/group_5.360.980087597 YES ACTIVE 100 6 1 +DATA/RAC/ONLINELOG/group_6.299.980087677 NO CURRENT 100 6 1 +FRA/RAC/ONLINELOG/group_6.361.980087735 NO CURRENT 100 Elapsed: 00:00:00.20 SQL> SQL> SQL> select l.group#, l.thread#, f.member, l.archived, l.status, (bytes/1024/1024) fsize from v$log l, v$logfile f where f.group# = l.group# order by 1,2 / 2 3 4 5 6 7 8 9 10 GROUP# THREAD# MEMBER ARCHIVED STATUS Size (MB) ------ ------- ---------------------------------------------------------------------- ---------- ---------- --------- 5 1 +DATA/RAC/ONLINELOG/group_5.298.980087539 YES ACTIVE 100 5 1 +FRA/RAC/ONLINELOG/group_5.360.980087597 YES ACTIVE 100 6 1 +DATA/RAC/ONLINELOG/group_6.299.980087677 NO CURRENT 100 6 1 +FRA/RAC/ONLINELOG/group_6.361.980087735 NO CURRENT 100 7 2 +DATA/RAC/ONLINELOG/group_7.300.980087819 YES ACTIVE 100 7 2 +FRA/RAC/ONLINELOG/group_7.362.980087867 YES ACTIVE 100 8 2 +DATA/RAC/ONLINELOG/group_8.301.980088099 NO CURRENT 100 8 2 +FRA/RAC/ONLINELOG/group_8.363.980088139 NO CURRENT 100 Elapsed: 00:00:00.19 SQL> SQL>
  • 11. SQL> SQL> SQL> SQL> SQL> exit Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP, Advanced Analytics and Real Application Testing options [oracle@rac1 ~]$ ```````````````````````````````````` login as: root root@192.168.78.52's password: Last login: Fri Jun 29 13:11:41 2018 from 192.168.78.1 [root@rac2 ~]# df -h Filesystem Size Used Avail Use% Mounted on /dev/mapper/vg_rac1-lv_root 27G 14G 12G 53% / tmpfs 2.0G 638M 1.4G 32% /dev/shm /dev/sda1 485M 55M 405M 12% /boot 12cR1_softs 430G 330G 101G 77% /media/sf_12cR1_softs /dev/asm/shared-385 1.0G 144M 881M 14% /SHARED [root@rac2 ~]# [root@rac2 ~]# [root@rac2 ~]# [root@rac2 ~]# su - oracle ================================================================== SETTING ENVIRONMENT 1. Grid 2. Database Enter your choice : 2 [oracle@rac2 ~]$sqlplus / as sysdba SQL*Plus: Release 12.1.0.1.0 Production on Fri Jun 29 14:44:12 2018 Copyright (c) 1982, 2013, Oracle. All rights reserved. Connected to: Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP, Advanced Analytics and Real Application Testing options SQL> set timing on SQL> set lines 200 pages 200 SQL> SQL> SQL> SQL> SQL> SQL> select l.group#, l.thread#, f.member, l.archived, l.status, (bytes/1024/1024) fsize from v$log l, v$logfile f where f.group# = l.group# and l.thread#=2 ; 2 3
  • 12. GROUP# THREAD# ---------- ---------- MEMBER -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- ---------------------------------------- ARC STATUS FSIZE --- ---------------- ---------- 3 2 +DATA/RAC/ONLINELOG/group_3.288.961583983 YES INACTIVE 50 3 2 +FRA/RAC/ONLINELOG/group_3.265.961583989 YES INACTIVE 50 4 2 +DATA/RAC/ONLINELOG/group_4.289.961583993 YES ACTIVE 50 4 2 +FRA/RAC/ONLINELOG/group_4.266.961583997 YES ACTIVE 50 7 2 +DATA/RAC/ONLINELOG/group_7.300.980087819 NO CURRENT 100 7 2 +FRA/RAC/ONLINELOG/group_7.362.980087867 NO CURRENT 100 8 2 +DATA/RAC/ONLINELOG/group_8.301.980088099 YES UNUSED 100 8 2 +FRA/RAC/ONLINELOG/group_8.363.980088139 YES UNUSED 100 8 rows selected. Elapsed: 00:00:42.39 SQL> SQL> SQL> SQL> SQL> SQL> SQL> SQL> SQL> SQL> set echo off set feedback off set linesize 120 set pagesize 35 set trim on set trims on set lines 120 col group# format 999 col thread# format 999 col member format a70 wrap col status format a10 col archived format a10 SQL> SQL> col fsize format 999 heading "Size (MB)"SQL> SQL> SQL> SQL> SQL> SQL>
  • 13. SQL> SQL> SQL> SQL> SQL> / GROUP# THREAD# MEMBER ARCHIVED STATUS Size (MB) ------ ------- ---------------------------------------------------------------------- ---------- ---------- --------- 3 2 +DATA/RAC/ONLINELOG/group_3.288.961583983 YES INACTIVE 50 3 2 +FRA/RAC/ONLINELOG/group_3.265.961583989 YES INACTIVE 50 4 2 +DATA/RAC/ONLINELOG/group_4.289.961583993 YES ACTIVE 50 4 2 +FRA/RAC/ONLINELOG/group_4.266.961583997 YES ACTIVE 50 7 2 +DATA/RAC/ONLINELOG/group_7.300.980087819 NO CURRENT 100 7 2 +FRA/RAC/ONLINELOG/group_7.362.980087867 NO CURRENT 100 8 2 +DATA/RAC/ONLINELOG/group_8.301.980088099 YES UNUSED 100 8 2 +FRA/RAC/ONLINELOG/group_8.363.980088139 YES UNUSED 100 Elapsed: 00:00:08.54 SQL> SQL> alter system switch logfile; Elapsed: 00:00:06.88 SQL> SQL> select l.group#, l.thread#, f.member, l.archived, l.status, (bytes/1024/1024) fsize from v$log l, v$logfile f where f.group# = l.group# and l.thread#=2 ; 2 3 GROUP# THREAD# MEMBER ARCHIVED STATUS Size (MB) ------ ------- ---------------------------------------------------------------------- ---------- ---------- --------- 3 2 +DATA/RAC/ONLINELOG/group_3.288.961583983 YES INACTIVE 50 3 2 +FRA/RAC/ONLINELOG/group_3.265.961583989 YES INACTIVE 50 4 2 +DATA/RAC/ONLINELOG/group_4.289.961583993 YES INACTIVE 50 4 2 +FRA/RAC/ONLINELOG/group_4.266.961583997 YES INACTIVE 50 7 2 +DATA/RAC/ONLINELOG/group_7.300.980087819 YES ACTIVE 100 7 2 +FRA/RAC/ONLINELOG/group_7.362.980087867 YES ACTIVE 100 8 2 +DATA/RAC/ONLINELOG/group_8.301.980088099 NO CURRENT 100 8 2 +FRA/RAC/ONLINELOG/group_8.363.980088139 NO CURRENT 100 Elapsed: 00:00:09.10 SQL> SQL> SQL> alter database drop logfile group 3; Elapsed: 00:00:10.56 SQL> SQL> alter database drop logfile group 4; Elapsed: 00:00:03.52 SQL>
  • 14. SQL> select l.group#, l.thread#, f.member, l.archived, l.status, (bytes/1024/1024) fsize from v$log l, v$logfile f where f.group# = l.group# and l.thread#=2 ; 2 3 GROUP# THREAD# MEMBER ARCHIVED STATUS Size (MB) ------ ------- ---------------------------------------------------------------------- ---------- ---------- --------- 7 2 +DATA/RAC/ONLINELOG/group_7.300.980087819 YES ACTIVE 100 7 2 +FRA/RAC/ONLINELOG/group_7.362.980087867 YES ACTIVE 100 8 2 +DATA/RAC/ONLINELOG/group_8.301.980088099 NO CURRENT 100 8 2 +FRA/RAC/ONLINELOG/group_8.363.980088139 NO CURRENT 100 Elapsed: 00:00:00.71 SQL> SQL> SQL> SQL> exit Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP, Advanced Analytics and Real Application Testing options [oracle@rac2 ~]$