This article answers the following queries:
· What are the scenarios in which contol file should be backed up in oracle?
· How to backup control file in oracle?
· How to recover an instance when one of the control files got corrupted ?
· How multiple control files are managed in Oracle ?
---------------------------------------------------------------------------------------
Scenarios in which control file to be backed up in Oracle
It is very important to backup control file whenever there is a change in the physical structure of the database. Some of the examples of structural changes are
- Adding or dropping or renaming of datafiles
- Adding or dropping a tablespace
- Altering the read/write state of the tablespace
- Adding or dropping redolog files or groups
Control file backup procedure in Oracle
ALTER DATABASE BACKUP CONTROLFILE statement is used to backup control files in Oracle.
There are 2 options to backup control files.
- Backup the control file to a binary file (duplicate of existing control file) using the below statement:
ALTER DATABASE BACKPUP CONTROLFILE TO ‘/oracle/backup/control.bkp’;
- Produce SQL statements that can later be used to re-create control file.
ALTER DATABASE BACKUP CONTROLFILE TO TRACE;
Above command writes a SQL script to the database trace file where it can be captured and edited to regenerate the control file.
Recovering an instance when one of the control files got corrupted
Oracle recommends to have atleast 2 control files each stored on a different disk.
(Please note, for SAP applications , 3 control files are generally maintained in an oracle database at different locations)
If a control file got corrupted due to a disk failure the respective instance should be shut down. Once the disk drive is repaired, the corrupted control file can be restored using the copy of control file from other disk and the instance can be brought up. In these cases, media recovery is not required.
How multiple control files are managed in Oracle?
- All the control files that are listed in the CONTROL_FILES parameter are updated by the database.
- The database reads only the first file listed in the CONTROL_FILES parameter during database operation
- If any of the control files got corrupted or become unavailable during database operation, the instance won’t function and it should be shutdown and recovered as mentioned earlier
Related Links :
Control file and its functions in Oracle
Steps to be followed to rename or move control files location
Control file and its functions in Oracle
No comments:
Post a Comment