Monday, 7 March 2016

File Types and Locations

Control Files


A control file is the root file which  maps out the other files which make up the the physicalstructure of the database.
Information stored includes:

  • Database name and DBID

  • Tablespace information

  • Path information about datafiles, online redo log files, and archived redo log files

  • Timestamp of creation

  • RMAN backups

This file is required to open the database and serves to keep track of structural changes such as adding,  renaming, and dropping datafiles.
The file contains metadata which is required when the database is not open.
This data includes important checkpoints (stored SCN Number) which holds the point from where database can recover from in event of failure.
Commited transactions occuring before the checkpoint(SCN ###) will have been safely written to datafile.

Every 3 seconds, the control file is updated with the latest checkpoint position in the online redo logs.

Diagram - Control File

Data Files
Oracle stores user and application data in datafiles. A datafile can constitute a single tablespace.
A tablespace can be made up of multiple datafiles.
A segment can span many datafiles but only one tablespace.
A database MUST have a SYSTEM and SYSAUX table space.
Oracle usually assigns the first datafiles to these tablespaces.
The SYSTEM holds  the datadictionary, while the SYSAUX holds statistic information

No comments:

Post a Comment