Friday, February 8, 2019

Control, Redo & datafiles

Control, Redo & datafiles


The most important files in oracle are
1. control file
2. Redo files
3. Data files

CONTROL FILE:
Number of Data files  (DBF’s)
Redo Log Files
File Names
File Timestamps
SCN (System Change Number)
Tablespace details any backup info
Critical Information about the database including whether the database has closed last time gracefully or not.
Without the control file even if the files are present (dbf’s , Redo’s) the database cannot be opened.
We require minimum of one control file. But it is advisable to have 2 or 3 mirror copies in different drives, so that even if one drive fails, with the help of second control file we can open the database.
controlfile is a very tiny file (size 500kb to 1mb) as it contains only the details of db, not any data like tables.

REDOLOG FILE:
These files contain latest info performed by end users against the tables.
We require min two redo log groups.
At any point in time oracle writes to one redolog file which is said to be in status called “CURRENT” and once the file gets filled up oracle performs a “LOG SWITCH” and starts writing to second file which will now become  “CURRENT” and this is a cyclic process.
A background processes called “LOG WRITER” is responsible for writing to the redolog files.
We can have more log groups to avoid “PAUSE STATE”
Redolog Files are usually any where between 500kb to 3mb depending on the number of transactions.(in Oracle10g min redo log size is 4MB)

DATA FILE
These are database files which represent tablespace.
One database file can represent only one tablespace.
Each DBF is made up of oracle blocks which is 2n kb (N ranges from 1 … 5)
The supported block sizes in oracle are 2k, 4k, 8k, 16k, and 32k.
All our tables, indexes are ultimately created in DBF’s
The very first block in every DBF has most important info called SCN.

No comments:

Post a Comment