Redo logs management in oracle 11g


In this tutorial we will learn  what is redo logs in oracle,view oracle redo log group and members (redo log files),  add redo log file in redo group,drop redo log file and redo log group in oracle.





    What is redo logs  in oracle

    REDO log file is very essential file for Oracle database which is stored in physical filesystem of hard disk. Normally it is a file which records all changes made in oracle database .
    Suppose a user modified any row using SQL query ,the changed data  will be stored in redo Buffer in SGA components. Then LGWR  process transferred all data from redo Buffer to redo log file under the following conditions.

    1. Redo Buffer one third full
    2. Every 3 seconds
    3. After a successful transaction committed
    4. Before data blocks transfer from db buffer cache to data files.


    View oracle redo log group and members (redo log files)

    We can see Status of redo group and size using the dba directory table  called v$log .here group 2 is current means oracle uses this group to store redo log file and group 1 and group 3 are inactive means it is no longer required to recover oracle database.

    Status of redo group

    We can view oracle redo log group members using one Dba directory called v$logfile. Here under the member we find the location of the redo log file. Here redo01.log file belongs to group 1 , redo02.log file belongs to group 2 and redo03.log file belongs to group 3.
    It is recommended that each group should be at least two redo log file if none redo log file is corrupted then database will be worked using other redo log file.and also two redo log files will be stored on the different disks.if one disk is corrupted then we will get second redo log file in other disk.
    redo logs  in oracle




     Add redo log file in redo group

    We can add redo log file member to redo log group using the command.here redo01a.log redo log file member is added to group 1 and it's status is invalid.
    Add  redo log file


    After switching the log file the status will be valid.
    Add redo log file

    Drop redo log file and redo log group in oracle

    We can drop redo log file using the below command. Here redo01a.log file will be dropped.
    Drop redo log file


    We can drop redo log group sing the below command. Here we delete group 1 .we can not drop the group which status is current.in our case our current group is group 2.
    Drop redo group

    After dropped the group 1 ,redo log files inside the group 1 was not deleted.it is stored on the physical filesystem of the disk.we need delete this log file using the os command.
    Here we did not delete this file and create group 1 using the same file we got this below error.
    Error

    After deleted the Physical redo log file from the disk we can create redo group 1 with the redo log file using the same name.no error came.
    Redo log management oracle 11g


    In this article we have learned
    1.   what is redo log file in oracle
    2. View oracle redo log group and members (redo log files)
    3. Add redo log file in redo group
    4. Drop redo log file and redo log group in oracle
    Stay tune with us.😊


    SHARE

    Admin

    • Image
    • Image
    • Image
    • Image
    • Image
      Blogger Comment
      Facebook Comment

    0 comments:

    Post a Comment