2 Day DBA > Backing Up and Recovering > Backing Up and Restoring th... > Restoring and Recovering th...
Restoring and Recovering the Database |
Previous |
Next |
You restore and recover the database with the supplied restore script. The instructions in this section are based on the following assumptions:
A software failure, media (disk) failure, or operator error caused the loss or corruption of one or more database files, rendering the database unusable.
In the flash recovery area, the backup sets and, if in ARCHIVELOG
mode, archived logs, are intact and available.
If in ARCHIVELOG
mode, the online redo logs are intact and available.
Note: If they are not available, the database is restored to the point of the last transaction included in an archived log. See Oracle Database Backup and Recovery Basics for more information. |
The Oracle Database XE host computer and operating system are operational.
The Oracle Database XE installed software (binaries) are intact and operational.
In situations where not all of these assumptions are true, before proceeding with the following steps to restore and recover the database, you may first have to complete one or more of the following tasks: repair or replace computer hardware, reinstall operating system software, or reinstall Oracle Database XE. After reinstalling Oracle Database XE, if your flash recovery area was previously on a separate disk from your Oracle Database XE installation and is still available, you must specify the location of the flash recovery area so that the restore script can find the required files. See "Setting Flash Recovery Area Location and Size" for instructions.
To restore the database:
Do one of the following:
On Windows: Log in to the Oracle Database XE host computer as a user who is a member of the ORA_DBA
user group. This is typically the user that installed Oracle Database XE.
On Linux: Log in to the Oracle Database XE host computer as a user who is a member of the dba
user group. This is typically the oracle
user.
See "Operating System Authentication" for more information.
Do one of the following:
On Windows: Click Start, point to Programs (or All Programs), point to Oracle Database 10g Express Edition, and then select Restore Database.
On Linux with Gnome: In the Applications menu, point to Oracle Database 10g Express Edition, and then select Restore Database.
On Linux with KDE: Click the icon for the K Menu, point to Oracle Database 10g Express Edition, and then select Restore Database.
A console window opens so that you can interact with the restore script. The script displays the following output:
This operation will shutdown and restore the database. Are you sure [Y/N]?
Note: In some rare situations the database may be unable to locate the flash recovery area. In this situation, the script displays the following output:Enter the flash recovery area location: If so prompted, enter the absolute path on your file system to the location of the flash recovery area. See Table: Flash Recovery Area Default Locations. |
Answer y
to confirm the database restore.
The database is shut down, and the script runs RMAN
to restore the database and, if running in ARCHIVELOG
mode, recover all changes since the last backup.
If the restore and recovery process is completed successfully, the database is opened again when the restore script completes. The script then displays the following output:
Restore of the database succeeded.
Log file is at location
Press any key to exit
where location
is the location of the log file.
If the restore and recovery process fails, output describing the error is displayed.
==================== ERROR =============================
Restore of the database Failed.
RMAN Error - See log for details
Log file is at location
==================== ERROR =============================
You can refer to the log file for details of the cause of the error.
Press any key to close the Restore Database window.