--Course ID: CS540 (B) --Student ID: 16020 --Student Name: Jaydutt Pathak --Homework#: 05
ANSWER 1: Redo Log Files record all changes made to data and provide a recovery mechanism from a system or media failure. Moreover the most crucial structure for recovery operations is the redo log, which consists of two or more reallocated files that store all changes made to the database as they occur. Every instance of an Oracle Database has an associated redo log to protect the database in case of an instance failure. Redo log files are filled with redo records. A redo record, also called a redo entry, is made up of a group of change vectors, each of which is a description of a change made to a single block in the database. Redo log files are organized into groups. An Oracle database requires at least two groups. Each redo log within a group is called a member. ANSWER 2: Redo logs are used in a cyclic fashion and th e redo log of a database consists of two or more redo log files. The database requires a minimum of two files to guarantee that one is always available for writing while the other is being archived. LGWR writes to redo log files in a circular fashion. When the current redo log file fills, LGWR begins writing to the next available redo log file. When the last available redo log file is filled, LGWR returns to the first redo log file and writes to it, starting the cycle again. Redo log files are filled with redo records. A redo record, also called a redo entry, is made up of a group of change vectors, each of which is a description of a change made to a single block in the database. For example, if you change a salary value in an employee table, you generate a redo record containing change vectors that describe changes to the data segment block for the table, the undo segment data block, and the transaction table of the undo segments. Filled redo log files are available to LGWR for reuse depending on whether archiving is enabled. If archiving is disabled (the database is in NOARCHIVELOG mode), a filled redo log file is available after the changes recorded in it have been written to the datafiles. If archiving is enabled (the database is in ARCHIVELOG mode), a filled redo log file is available to LGWR after the changes recorded in it have been written to the datafiles and the file has been archived.
ANSWER 3: Information about group and members can be obtained by querying the data dictionary. A log switch occurs when LGWR stops writing to one redo log group and starts writing to another. By default, a log switch occurs automatically when the current redo log file group fills. If we want to drop the currently active group, but are not able to do so until the group is inactive. This option is useful in configurations with large redo log files that take a long time to fill. To force a log switch, you must have the ALTER SYSTEM privilege. Use the ALTER SYSTEM statement with the SWITCH LOGFILE clause.
You've reached the end of your free preview.
Want to read all 8 pages?
- Spring '18
- Oracle Database, Redo log