Translate

মঙ্গলবার, ৭ জানুয়ারী, ২০১৪

Administering Redo Logs, Control Files, and Rollback Segments



In the last few days you saw how to create a database and how to add datafiles and tablespaces to customize that database for your own use. Remember, the instance is made up of the files used by Oracle, the processes or threads, and the memory used by Oracle. The files used by the database are made up of the following:
  • The datafiles. These are the actual files that are used to store tablespaces.
  • The redo log files (sometimes just known as the redo log). This is where all redo information is kept. Without the redo log files you would not be able to recover from a system failure.
  • The control files. These files contain information vital to the Oracle database. The information that is used to tell the instance where the datafiles and log files reside is stored in the control file.
  • The parameter file. This file contains tuning information that is used by Oracle at startup. This is commonly referred to as the init.ora file.
There are also the RDBMS binaries and other files such as backup files, archive log files, and so on, but they are not really part of the database itself, even though they are essential to the RDBMS.
As you saw on Day 7, "Administering Tablespaces," a tablespace can hold four different types of segments:
  • Data segment--Used to hold tables and clusters
  • Index segment--Used to hold indexes
  • Rollback segment--Special types of segments that are used to store undo information
  • Temporary segment--Used for storing temporary data
Today you will look at the rollback segments. Data segments, index segments, and temp-orary segments are covered on Days 12-15. The rollback segment is not only important to the basic function of the Oracle RDBMS, but it has performance implications as well.
Redo Log Files
The redo log files are used to store redo information. Each time data is changed in the database, a log record is written describing the change(s). With this information the database can be recovered in the event of a system failure.
If a catastrophic system failure occurs, such as a power failure, component failure, or similar occurrence, the Oracle instance will be aborted. The instance will be cut off immediately or, in the event of a disk failure, the instance might crash. If this occurs, all changed data in the buffer cache will be lost; only changes that have been written out to disk will be saved.
New Term: When Oracle is restarted, the information in the redo log file will be used to reproduce changes that have been made to the database, thus saving as much work as possible. All previously committed transactions will be recovered; this is also known as being rolled forward. All transactions that had modified data but had not been committed will be backed out; this is known as rolling back.
The redo log file is necessary for proper recovery. If this file is lost due to a disk failure, you will not be able to recover in the event of a system failure; therefore, you must protect the redo log file against this kind of failure. I recommend you use disk mirroring or RAID-1 on all redo log files.
Because the redo log files are so critical to the recoverability of the system, it is recommended that you do not use a caching disk controller with write-caching unless that cache is backed up with a battery. In the event of a power failure, you must make sure that no redo information is lost. It is often recommended that write-caching not be used at all on the redo log, but I feel that if you have a battery back-up your risk is reduced.

WARNING: If you use a write-caching on the controller that has the redo log files and it is not backed up with a battery, you are in danger of losing data. In the event of a power failure, you will lose redo information and might not be able to recover. 

Thank you
Asraful

কোন মন্তব্য নেই:

একটি মন্তব্য পোস্ট করুন

Popular Posts

show

click here