Overview of Control Files
The database control file is a small binary file associated with only one database. Each database has one unique control file
A control file contains information such as the following:
·The database name and database unique identifier (DBID)
·The timestamp of database creation
·Information about data files, online redo log files, and archived redo log files
·Tablespace information
·RMAN backups
purposes:
·It contains information about data files, online redo log files, and so on that are required to open the database.
·It contains metadata that must be accessible when the database is not open.(mount或nomount)
Multiple Control Files
By multiplexing a control file on different disks, the database can achieve redundancy and thereby avoid a single point of failure.
When other current control file copies exist, the database can be remounted and opened without media recovery.
Control File Structure
Each section is stored in multiple logical control file blocks. Records can span blocks within a section.每一节记录都储存在多个逻辑上的控制文件块里。不同的块可以拥有同样的记录
The control file contains the following types of records:
·Circular reuse records
Examples include records about archived redo log files and RMAN backups.
·Noncircular reuse records
Examples of information include tablespaces, data files, online redo log files, and redo threads.
Reading and writing the control file blocks is different from reading and writing data blocks. For the control file, Oracle Database reads and writes directly from the disk to the program global area (PGA).数据库是使用PGA读写控制文件内容的
Overview of the Online Redo Log
对于数据库恢复最重要的是Online Redo Log。a minimum of two files至少有两个(组)日志
protect against data loss
Specifically, after an instance failure the online redo log files enable Oracle Database to recover committed data not yet written to the data files.
The contents of the log include uncommitted transactions, undo data, and schema and object management statements.
can query online redo log files through a SQL interface in the Oracle LogMiner utility。Redo log files are a useful source of historical information about database activity.
Online Redo Log Switches
注意一个是log switch时日志序列号log sequence number是会变化递增的
第二个注意Filled online redo log files are available for reuse depending on the archiving mode
Noarchivelog模式下,DBWn写过checkpoint就可用了(数据库数据已commited写完)
Archivelog模式下,不仅数据库数据已被写入,并且此log文件被归档后才可用
Multiple Copies of Online Redo Log Files
An online redo log group consists of an online redo log file and its redundant copies
Each member in a group must be the same size.
Archived Redo Log Files
An archived redo log file is a copy of a filled member of an online redo log group.
an offline copy
Archiving is either automatic or manual and is only possible when the database is in ARCHIVELOG mode.
the archiver process (ARCn) will archive one of these files.
Structure of the Online Redo Log
Online redo log files contain redo records. A redo record is made up of a group of change vectors, each of which describes a change to a data block.
The redo records have all relevant metadata for the change, including the following:
·SCN and timestamp of the change
·Transaction ID of the transaction that generated the change
·SCN and timestamp when the transaction committed (if it committed)
·Type of operation that made the change
·Name and type of the modified data segment
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/24005010/viewspace-684079/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/24005010/viewspace-684079/