The purpose of a backup and recovery is to protect the database against data loss and reconstruct the database after data loss.
1. Backup
A backup is a copy of data of a database that can use to reconstruct data. A backup can be either a physical backup or a logical backup.
Physical backups
Physical backups are copies of the physical files. These files include datafiles, control files, and archived redo logs. Every physical backup is a copy of files that store database information to another location, whether on disk or on offline storage media such as tape.
Logical backups
Logical backups contain logical data such as tables and stored procedures. Logical backups are a useful supplement to physical backups in many circumstances but are not sufficient protection against data loss without physical backups.
2. Oracle database failures
Several problems can halt the normal operation of an Oracle database or affect database I/O operations such as: media failure, user errors, and application errors.
Media Failures
A media failure is a physical problem with a disk that causes a failure of a read or write of a disk file required to run the database.
User Errors
User errors occur when, either due to an error in application logic or a manual mistake, data in a database is changed or deleted incorrectly. An example of such error is deleting the wrong row from the employees table.
Application Errors
Software malfunction can corrupt data blocks which is also called a media corruption. The database does not recognize the block at all: the checksum is invalid, the block contains all zeros, or the header and footer of the block do not match.
3. Oracle Backup and Recovery Solutions
There are two solutions avilable for oracle backup and recovery.
User-managed backup and recovery
In this method backup and recovery performed with a mixture of host operating system commands and SQL*Plus recovery commands.
Recovery Manager (RMAN)
A oracle client that establishes a connection with a server process and automates the movement of data for backup and recovery operations. RMAN offers a number of backup techniques not available through user-managed methods.
4. RMAN Backup Features
Incremental backups
An incremental backup stores only blocks changed since a previous backup. Incremental backups provide more compact backups and faster recovery. BACKUP INCREMENTAL command is used to perform incremental backups.
Block media recovery
To repair a datafile with only a small number of corrupt data blocks without taking it offline or restoring it from backup. RECOVER command is to perform block media recovery.
Unused block compression
RMAN Backup skip data blocks that have never been used and, in some cases, used blocks that are currently unused.
Binary compression
RMAN Backup uses binary compression to reduces the size of backups.
Encrypted backups
RMAN Backup uses backup encryption to store backup sets in an encrypted format. The database must use the Advanced Security Option. To create encrypted backups directly on tape, RMAN must use the Oracle Secure Backup SBT interface, but does not require the Advanced Security Option
5. Oracle Flashback Technology
This set of features provides an additional layer of data protection use flashback features to view past states of data and rewind your database without restoring backups, flashback features are more efficient and less disruptive than media recovery in most situations in which they apply
5.1. Logical Flashback Features
Most of the flashback features of Oracle operate at the logical level, enabling you to view and manipulate database objects. The logical-level flashback features of Oracle do not depend on RMAN. With the exception of Flashback Drop, the logical flashback features rely on undo data.
Oracle Database includes the following logical flashback features
Oracle Flashback Query
Specify a target time and run queries against a database. To recover from an unwanted change like an update to a table, you could choose a target time before the error
Oracle Flashback Version Query
You can view all versions of all rows that ever existed in one or more tables in a specified time interval. You can use this feature to recover lost data values and to audit changes to the tables queried
Oracle Flashback Transaction Query
You can view changes made by a single transaction, or by all the transactions during a period of time
Oracle Flashback Transaction
You can reverse a transaction. Oracle Database determines the dependencies between transactions and in effect creates a compensating transaction that reverses the unwanted changes. The database rewinds to a state as if the transaction, and any transactions that could be dependent on it, had never happened
Oracle Flashback Table
You can recover a table or set of tables to a specified point in time in the past without taking any part of the database offline. In many cases, Flashback Table eliminates the need to perform more complicated point-in-time recovery operations.
Oracle Flashback Drop
You can reverse the effects of a DROP TABLE statement
A flashback data archive enables you to use some of the logical flashback features to access data from far back in the past. A flashback data archive consists of one or more tablespaces or parts of tablespaces.
5.2. Flashback Database
At the physical level, Oracle Flashback Database provides a more efficient data protection alternative to database point-in-time recovery (DBPITR). If the current datafiles have unwanted changes, then you can use the RMAN command FLASHBACK DATABASE to revert the datafiles to their contents at a past time.
Flashback Database uses flashback logs to access past versions of data blocks and some information from archived redo logs. Flashback Database requires that you configure a flash recovery area for a database because the flashback logs can only be stored there.
Oracle Database also supports restore points in conjunction with Flashback Database and backup and recovery. A restore point is an alias corresponding to a system change number (SCN).
6. Data Recovery Advisor
Data Recovery Advisor tool that automatically diagnoses persistent data failures, presents appropriate repair options, and executes repairs at your request. Data Recovery Advisor provides a single point of entry for Oracle backup and recovery solutions. You can use Data Recovery Advisor through the Enterprise Manager Database Control or Grid Control console or through the RMAN command-line client.
| Related Articles | Latest Articles |
