All technological notes.
online redo log
data files.The database maintains online redo log files to protect against data loss.
online redo log files enable Oracle Database to recover committed data that it has not yet written to the data files.Server processes write every transaction synchronously to the redo log bufferThen the LGWR process then writes to the online redo log.
As the database makes changes to the undo segments, the database also writes these changes to the online redo logs.
online redo log always contains the undo data for permanent objects.temporary objects in a temporary undo segment, which saves space and improves performance,permanent and temporary undo data in the online redo log.online redo log only for recovery.
online redo log files through a SQL interface in the Oracle LogMiner utility (see “Oracle LogMiner”).redo thread:
online redo log for a database instanceredo thread is present.In an Oracle Real Application Clusters (Oracle RAC) configuration, however, multiple instances concurrently access a database, with each instance having its own redo thread. A separate redo thread for each instance avoids contention for a single set of online redo log files.
online redo log consists of two or more online redo log files.
Oracle Database uses only one online redo log file at a time to store records written from the redo log buffer.唯一
the current online redo log file
log writer process (LGWR) process is actively writing 当前写入的文件log switch
online redo log file and begins writing to another.Scenario: 发生情况
current online redo log file is full and writing must continue.Log writer writes to online redo log files circularly. When log writer fills the last available online redo log file, the process writes to the first log file, restarting the cycle.循环写入

LGWRwrites to each online redo log file.- The database assigns each file a new
log sequence numberwhen a log switches and log writers begins writing to it.- When the database reuses an online redo log file, this file receives the next available
log sequence number.
Filled online redo log files are available for reuse depending on the archiving mode:
NOARCHIVELOG mode:
online redo log file is available after the changes recorded in it have been checkpointed (written) to disk by database writer (DBW). 检查点被写入ARCHIVELOG mode:
data files and the file has been archived. 写入到 df 而且 文件被存储.Oracle Database can automatically maintain two or more identical copies of the online redo log in separate locations.
online redo log group
Purpose:

- Each member in a group must be the same size.
- group 1: 2 members, 01a,01b
- group 2: 2 members, 02a, 02b
- LGWR never writes concurrently to members of different groups. 每次指挥写入同一组.
LGWRwrites concurrently to group 1, then writes concurrently to group 2, then writes to group 1, and so on.
archived redo log file
online redo log group.The file is not considered part of the database, but is an offline copy of an online redo log file created by the database and written to a user-specified location. 不认为是 db 的一部分, 只是另外存储的离线副本.
Purpose: a crucial part of a backup and recovery strategy.
Oracle LogMiner utilityarchiving:
archived redo log fileARCHIVELOG mode.An archived redo log file includes
redo entrieslog sequence number of the identical member of the online redo log group.If the database is in ARCHIVELOG mode, and if automatic archiving is enabled, then the archiver process (ARCn) will archive one of these files.
archived redo log contains a copy of every redo log group that existed starting from the time that you enabled archiving.Online redo log files contain redo records.
redo record
The redo records have all relevant metadata for the change, including the following:
SCN and time stamp of the changeSCN and time stamp when the transaction committed (if it committed)The database maintains online redo log files to protect against data loss. Specifically,after an instance failure.
SHOW con_name
alter pluggable database all open;
select con_id,name,open_mode from v$containers;
#1 CDB$ROOT READ WRITE
#2 PDB$SEED READ ONLY
#3 ORCLPDB READ WRITE
select * from v$logfile;
