Professional Documents
Culture Documents
APPLIES TO:
Oracle Database - Enterprise Edition - Version 11.2.0.3, 11.2.0.4
DETAILS
EXAMPLE OF HOW TO RESIZE THE ONLINE REDO LOGS:
==============================================
Often times the online redo logs are sized too small causing database performance problems.
The following is an example of how to resize the online log groups:
NOTE: Examples are given for 9i and higher.
connect as the internal user.
BYTES
STATUS
1048576 INACTIVE
1048576 CURRENT
1048576 INACTIVE
3. In older versions of the database you needed to shutdown and issue the following commands in restricted
mode. You can still do this, but the database can be online to perform these changes.
Let's create 3 new log groups and name them groups 4, 5, and 6, each 10MB in size:
SQL> alter database add logfile group 4
'/usr/oracle/dbs/log4PROD.dbf' size 10M;
SQL> alter database add logfile group 5
'/usr/oracle/dbs/log5PROD.dbf' size 10M;
SQL> alter database add logfile group 6
'/usr/oracle/dbs/log6PROD.dbf' size 10M;
4. Now run a query to view the v$log status:
SQL> select group#, status from v$log;
GROUP# STATUS
1 INACTIVE
2 CURRENT
3 INACTIVE
4 UNUSED
5 UNUSED
6 UNUSED
From the above we can see log group 2 is current, and this is one of the
smaller groups we must drop. Therefore let's switch out of this group into
one of the newly created log groups.
5. Switch until we are into log group 4, so we can drop log groups 1, 2, and 3:
SQL> alter system switch logfile;
** repeat as necessary until group 4 is CURRENT **
6. Run the query again to verify the current log group is group 4:
SQL> select group#, status from v$log;
GROUP# STATUS
1 INACTIVE
2 INACTIVE
Page 1
3 INACTIVE
4 CURRENT
5 UNUSED
6 UNUSED
Note: redo log Group 1 or 2 or 3 can be active after "alter system switch log file" which means could not be
dropped, in this case, you need to do "alter system checkpoint" to make redo log groups 1,2 and 3 inactive.
7. Now drop redo log groups 1, 2, and 3:
GROUP#
BYTES STATUS
Page 2