Saturday, August 13, 2011

How to resize redo logs

Modifying the redo logs:
------------------------
SQL> select group#, bytes, status from v$log;

GROUP# BYTES STATUS
---------- ---------- ----------------
1 52428800 INACTIVE
2 52428800 CURRENT
3 52428800 INACTIVE

SQL> select group#, member,status from v$logfile;

GROUP# MEMBER
--------------------------------------------------------------------------------
3 /TESTDATA/TEST/testdata/redo03.log
2 /TESTDATA/TEST/testdata/redo02.log
1 /TESTDATA/TEST/testdata/redo01.log


SQL> alter database add logfile group 4 '/TESTDATA/TEST/testdata/redo04.log' size 125M;

alter database add logfile group 5 '/TESTDATA/TEST/testdata/redo05.log' size 125M;

alter database add logfile group 6 '/TESTDATA/TEST/testdata/redo06.log' size 125M;


select group#, bytes, status from v$log;

Switch until we are into log group 4

alter database drop logfile group 1;
alter database drop logfile group 2;
alter database drop logfile group 3;

remove the files at OS level

No comments:

Post a Comment