Adding New Redologs to the Database

Findout the status of the existing redolog groups.

SQL> select  GROUP#,THREAD#,BYTES/1024/1024,STATUS from v$log;

    GROUP#    THREAD# BYTES/1024/1024 STATUS
---------- ---------- --------------- ----------------
         1          1             100 CURRENT
         2          1             100 INACTIVE
         3          1             100 INACTIVE
       
Makesure they are inactive and drop them and add a new one with new
use the force log switching to switch the the status from current or active to inactive
SQL> ALTER SYSTEM SWITCH LOGFILE;

Adding new Groups:
SQL> ALTER DATABASE ADD  LOGFILE GROUP 4 '/data1/app/oracle/oradata/Redo_evatdb04.log' size 120m ;
SQL> ALTER DATABASE ADD  LOGFILE GROUP 5 '/data1/app/oracle/oradata/Redo_evatdb05.log' size 120m ;
SQL> ALTER DATABASE ADD  LOGFILE GROUP 6 '/data1/app/oracle/oradata/Redo_evatdb06.log' size 120m ;

Removing the existing based on their stauts

SQL> ALTER DATABASE CLEAR LOGFILE GROUP 1;
SQL> ALTER DATABASE DROP LOGFILE GROUP 1;

SQL> ALTER DATABASE CLEAR LOGFILE GROUP 2;
SQL> ALTER DATABASE DROP LOGFILE GROUP 2;

SQL> ALTER DATABASE CLEAR LOGFILE GROUP 3

SQL> ALTER DATABASE DROP LOGFILE GROUP 3;

and check the latest files

SQL> select  GROUP#,THREAD#,BYTES/1024/1024,STATUS from v$log;

GROUP#    THREAD# BYTES/1024/1024 STATUS
---------- ---------- --------------- ----------------
         4          1             120                       CURRENT
         5          1             120                       ACTIVE
         6          1             120                       INACTIVE
      


No comments:

Post a Comment

Thank for showing interest in giving comments/feedback/suggestions

Note: Only a member of this blog may post a comment.