This section helps you to develop an approach to restore and recover of your Oracle database in the event of failure.
Always analyze the problem carefully before attempting to recover your database. If in doubt, seek support from SAP. The business costs of an incorrect or delayed recovery can easily outweigh consultancy fees.
We strongly recommend you to practice restore and recovery on a test system as similar as possible to your production system. Repeat this regularly, especially after you have modified the production system.
The following graphic shows an overview of the restore and recovery process:
You use the following tools for database restore and recovery:
Tool | Use |
Restore and Recovery with BR*Tools | Restore and recovery with the BR*Tools user interface |
BRRESTORE | Restore of database and offline redo log files |
BRRECOVER | Recovery of database and offline redo log files |
Database Recovery with SQLPLUS | Database recovery when BR*Tools is not sufficient |
Oracle Recovery Manager | Restore and recovery |
Prerequisites
Before you start to restore and recover your database, try to locate:
● The backups of the missing or faulty data files, or the required offline redo log files made with BRBACKUP or BRARCHIVE.
● The BRBACKUP logs and BRARCHIVE logs, which are very important for the restore because they contain all the information about the backups, such as directories, volumes, and timestamps. BRRECOVER uses the logs to find the backups of the data files and the offline redo log files.
If you lose the entire database system, including such items as the BRBACKUP and BRARCHIVE logs and profiles, you need to performDisaster Recovery.
BRRECOVER recovery is not based on BRBACKUP or BRARCHIVE logs in database tables, because these tables are not available when you recover the database.
You might also need to meet other prerequisites, depending on the context of the recovery.
Features
● Restore
BRRESTORE restores data files that have been damaged or are missing, using backups of the database files.
● Recovery
BRRECOVER recovers transactions lost since the database backup, using backups of the offline redo log files to roll forward the lost transactions.
BRRECOVER supports database recovery after:
○ Media errors, such as a disk crash or accidental deletion of database files
○ User errors such as software problems or when a user accidentally drops a table
○ Disaster, when the entire database is lost, including backup profiles and logs
After recovery, BRRECOVER automatically rebuilds NOLOGGING indexes that were created during or after the backups used. For more information, see SAP Note 849485.
You can perform restore, and recovery tasks from either of the following:
● The menus in BR*Tools
BR*Tools calls the tools BRBACKUP, BRARCHIVE, BRRESTORE, or BRRECOVER as necessary to complete the task you have chosen.
● The command line
In this way, you can use the tools BRBACKUP, BRARCHIVE, BRRESTORE, or BRRECOVER, but this requires expert knowledge.
We recommend you to use the DBA Planning Calendar for routine backup because this enables you to automatically schedule the backup.
We recommend you to use the BR*Tools menus for restore and recovery because BR*Tools guides you through the necessary steps.
Proceed as follows to restore and recover your database:
...
1. To analyze the problem, check the:
○ Database alert log
○ Trace files belonging to the background processes in the directory $ORACLE_HOME/saptrace/background.
2. Ask yourself the following questions:
○ What is the status of the database? Is it available or not?
○ What kind of error has occurred? A media or a user error?
○ Which files are corrupt?
○ What type of file is affected? Data files, control files, online redo log files?
○ If a media error has occurred, is software or hardware mirroring available?
○ Do you have a standby database?
3. If a user error has occurred, the database is still available, and you have enough time, perform a complete, offline backup before starting to restore and recover the database.
4. If a media error has occurred, you must replace the affected equipment and recreate the file system as it existed before the error.
5. Decide what kind of restore and recovery you want to perform:
Scenario | Aim | Solution |
Media error such as a disk crash | You want to recover to the time of failure | Complete Database Recovery |
User or software error | You want to recover to a selected point in time | Database Point-In-Time Recovery |
User or software error within one component of a multi-component database | You want to recover the affected component to a selected point in time. | Tablespace Point-in-Time Recovery |
Either of the following applies: ● Error in which all copies of redo log files are lost, but the database file backup is available ● You performed a complete or incremental offline or consistent online backupimmediately before the error, such as during a software upgrade. | You want to reset the database to the state it was in at the most recent offline or consistent online backup.
| Whole Database Reset |
Loss of entire database system, including backup profiles and logs | You want to recover as much as possible | Disaster Recovery |
Only if you are very experienced, you might want to consider the following in an exceptional situation:
● Restore of individual backup files
● Restore and application of offline redo log files
Be sure to consult SAP Support first if you are unsure about using these functions.
No comments:
Post a Comment