Professional Documents
Culture Documents
Backup is a copy of original data which protects the data from data loss and recovering data after a
data loss. Backup refer to physical backup of database files, control files and archived redo log files.
Recovery is to recover the database back to the state they were before any failure/Error situation.
Database can fail either entirely or partially because of various reasons. Oracle can recover some of
the failures automatically and some of the critical failures you need to go in and “recover” the database
using your backups.
1. Statement failure
Statement failure is when a program attempts to enter invalid data into an oracle table. The
statement will fail because of the checks built into the data insertion. We can validate the
statements and correct it.
User process may be terminated abruptly losing the session connection, performing and
abnormal disconnect
3. Network Failure
Network failure can occur due to oracle Net Listener, The network interface card(NIC) or
network connection has failed.
4. Instance Failure
Instance failure can occur due to hardware failure, power failure or an emergency shutdown
procedure.it may also happen when the key oracle background process such as pmon shuts
down because of an error condition.
1
Steps that can be checked after instance failure:
Check the alert log and trace files to get the cause of instance failure.
You can restart the database instance by using the oracle command startup from
SQL*plus command line
Oracle will perform automatic instance or crash recovery and performs the rollback
of uncommitted transactions by using the data from undo segments and will roll
forward the committed changes from online redo log files
Once the uncommitted changes are backed out and committed changes are rolled
forward,the datafiles are in sync again and will contain only the committed data.
At this stage the database is considered to be in consistent state.
5. User Error
User error means accidentally dropping a table, users can also wrongly modify or delete data
from a table.we can use flashback table feature to restore a table to previous point in time.
6. Media Failure
Media failure occurs when we lose a disk or a disk controller fails, delaying access to your
database.A head crash, file corruption and the overwriting or deletion of a data file is the
examples of a media failure.
The oracle instance consist of the system global area(SGA),which is the memory allocated to the oracle
instance, and a set of mandatory background processes.Oracle process starts when you start the
instance.
Each background process is in charge of specific activity such as writing changed data into data
files,cleaning up after disconnected user sessions and so on.
Let us review the key oracle background processes that perform critical backup and recovery-related
tasks.
Updates the latest SCN to control file and datafile headers by taking the information from redolog
files.This will happen at every checkpoint event
2
It is responsible for writing redo entries from log buffer cache to redolog files.It will perform
this in following situations.
Note: Log writer process writes before the database writer does,because of the write-ahead
protocol.Data changes aren’t necessarily written to datafiles when you commit a
transaction,but they are always written to the redo log.
The Archiver process
It will generate archives which are backup of redolog files in the specified location. This will be done
only if database is in archive log mode.
ARCHIVELOG mode is a mode that you can put the database in for creating a backup of all
transactions that have occurred in the database so that you can recover to any point in time. The
process of turning redo log files into archived redo log files is called archiving. This process is only
possible if the database is running in ARCHIVELOG mode.
NOARCHIVELOG mode is basically the absence of ARCHIVELOG mode and has the
disadvantage of not being able to recover to any point in time.
3
Now your database is in archive log mode, and archive log files should show up in your Fast
Recovery Area.