Топ-100
 
CerebroSQL

REDO Log Management in Oracle Database

Redo logs : Redo logs are special files in the Oracle database that ensure that all changes made by a session are logged in case a failure occurs between the time the changes are made and the time they are written to the data files. Thus, redo logs are the backbone  recovery process .

Oracle organizes its redo log files into log groups, and you must have at least two different redo log groups and at least one member each. You will need at least two groups because when one redo log is archived, the log writer process must be able to continue writing to the active redo log.

Although an Oracle database will work reasonably well with only one member per redo log group, Oracle strongly recommends multiplexing online redo logs. Multiplexing simply means that more than one member must be maintained in each of the redo log groups. All members of such a group are identical - the multiplexing is designed to protect against the loss of one of the copies of the log file. When multiplexing online redo logs, the log writer process writes in parallel to all files in the group.

file size  REDO is selected based on the intensity of data writing to the database, the number of groups and the speed of the disk subsystem.

In most cases, the log size  is set in the range from 1 to 4 GB, and the number of groups from 3 to 5.

Log management

The CerebroSQL program provides a complete set of tools for quickly assessing the correctness of the selected log parameters, their number, size, and also allows you to manage them through a simple interface.

Estimating the size of files in a group:

The monitoring core constantly collects information about the average time of switching records to log groups, on the main window of the metric  Switching logs. A low value of less than 5 minutes indicates potential problems due to the overhead of switching the recording process from one group to another. For more information about metrics, see " Metrics (main window) "

Viewing information about objects operations with which make the maximum contribution to the generation of data redo logs is performed through " General REDO size ", information on the total generation of logs by day is also available there.

Viewing information about REDO logs
Redo manager.jpg

 

To view information about a group, highlight it in the " REDO group list "

Block "Statistics"

general information

  • Number - number of the current active group

  • Size - size of files in a group

  • Time start - time to switch to the specified group

  • Switching logs (avg) - average time of activity of one group

  • General REDO size - generation of REDO data for the current day starting from 00:00

Block "Information on the selected group"

Information on the selected group

  • Group number - group number

  • Status - group status

  • File size - size of REDO files in the group

  • Count member - number of files in the group

  • Start time - the time when the group became active for the last time

"Group parameter" block

Group Options

  • Group number - group number

  • Group size - file size in a group

  • The " OMF (storage files) " checkbox is managed automatically. The data is retrieved from the v$parameter system view. Parameter values are checked  db_create_online_log_dest_N , if at least one of the parameters has a value, a check is issued

  • The " Standby group " checkbox is set if the log group is a standby group

  • File path - paths to the file in the group

V$INSTANCE_RECOVERY tab

Information from the system view  V$INSTANCE_RECOVERY

Create a new group

​​

  • In the list " REDO group list " highlight the line " New "

Block " Group parameter "

  • Enter the group number in the " Group number " field (the group number should not overlap with existing ones)

  • In the " Group size " field, enter the size of the files in the group

  • If you need to create a standby group, set the " Standby group " checkbox

  • If OMF is not used, in the " File path " block, enter the paths to the files, maximum 5 if it is necessary to multiplex the files in the group

  • Press the " Save " button

To view the command before execution switch to the SQL tab

REDO Manager - add log SQL