Please send your Questions & Answers or Feedback to "dvmadhavreddy@javabook.org"

Please send your Questions & Answers or Feedback to "mohan@javabook.org"

Archive Log Management

Database may run either in no archive log mode or archive log mode.
Once we create a database, by default it will be created in no archive log mode.
It is one of the important prime responsibility of DBA to configure the database in the archive log mode.
Once we configure the database in archive log mode, archiver background proccess gets enabled and picks the contents of the active online redo log file and generates a archive log file in the archive destination.


Archive logs are meant for recovery.
"Recovery" is nothing but applying archive log to the previous backup.
Every archive log will have a log sequence number.
During the process of recovery, oracle applies the archive logs in the same sequence(there is no concept of skipping and applying).
It is not only important to have a proper backup policy for the database, it is also equally important to have a proper backup policy for the archive log.
If the archive destination  is 100% filled, database goes to hung state(archiver error in the alert log file).
If the database is in the hung state, oracle will not allow the business users to establish a connection.
As a DBA, we need to take the backup of archive logs and we need to delete them from archive destination.
Prior to oracle 10g, in order to configure the database in the archive log mode, we need to set the following parameters .
                1.log_archive_start=true
                From 10g by default its true.
                2.log_archive_dest=<path>
                3.log_archive_format=%t%s%r.arch
                                t represents thread number/instance number
                                s represents the log sequence number
                                r represents the reset log id/incarnation number
From 10g, its not necessary to set the first and the third parameter.
From 10g, oracle recommands us to configure flash recovery area/fast recovery area(FRA).
If we configure FRA, by default archive logs will be created in FRA.
In order to configure FRA, we need to set the following parameters.
                1.db_recovery_file_dest_size
                2.db_recovery_file_dest
Once we configure FRA, the following files will be created in FRA.
                1.Archive logs
                2.Multiplexed control files
                3.Multiplexed redo log files
                4.RMAN backup sets
                5.Flashback logs

To know the availability of free space in FRA, we execute the following command
                SQL> select * from V$flashrecovery_area_usage;
Generally, log switches occurs under the following circumstances :
                1.if the online redo log file is filled
                2.if the DBA switches the online redo log file maually
                                SQL> alter system switch logfile;
NOTE : Archive log file is a content copy of online redo log file but not a image copy.
Related Posts Plugin for WordPress, Blogger...

Flag Counter