Page 612
Before continuing, double-check that you have all of the archived logs since the last backup was started. They should all be in the archived log directory. Now you're ready to roll forward the old data files to the last commit:
RECOVER AUTOMATIC DATABASE;
Windows EnvironmentsThis procedure describes the same recovery procedure as described above for the Windows NT operating system. Although you can recover a Windows NT Oracle database using the same command-line utilities described above, it is much easier and more straightforward to use Oracle's GUI tools.
You need to identify which files were lost. Keeping a list of all data files on the database is helpful when you're completely recovering a database with Recovery Manager. Whenever you add a data file to the database, Recovery Manager should be started and then closed. Recovery Manager builds a list of data files, control files, and redo logs every time it is started and the database is running. By doing this, you can browse through Recovery Manager's list of data files to determine which files are lost or damaged. You should still keep a paper copy of the data files in your Windows NT-based Oracle instances.
In the Windows environment, Oracle's Recovery Manager takes care of almost everything related to a complete recovery. Before starting, you should double-check that you have all of the archived logs since the beginning of the last backup. These files should all be in the archived log directory specified in the init<instance>.ora or config<instance>.ora file. If you backed up your database to disk, you need to make sure the backup files are online. Otherwise, you'll need to have the backup tape handy.
Follow these steps to recover your Windows NT Oracle database:
Page 613
FIG. 24.5
Selecting database files
to recover with
Recovery Manager.
Recovery Manager will automatically roll forward the data files from the last backup using the redo and archived logs. If you need to recover any missing redo log files, complete the following steps:
Page 614
If you need to recover any missing control files, complete the following steps:
When you completely recover a database, your intention is to avoid losing any committed transactions. To do this, you must have all of the archived logs since the beginning of the last backup, as well as current redo logs. If you do not have all of these files, you must perform an incomplete recoveryyou must bring the database up with some transactions lost.
Generally, this type of recovery is something to be avoided. However, there are instances when you need to restore a database as it was at some point in the past. Suppose a bank is being investigated by auditors for covering up money laundering. The auditors would probably like to look at the bank's databases as they were during the money laundering but before the cover-up. A DBA can, with the right set of hot or cold backups and archived logs in place, take the database back in time, so to speak. The auditors could then examine the database as it was during the laundering operation and expose the crime.
Command-Line EnvironmentsIf an archived log file is missing, Oracle will stop the recovery process and prompt you to place the missing file in the archived log directory. Because you do not have this log file available for whatever reason, you need to tell Oracle to open the database with what it has recovered so far. Oracle cannot skip an archived log and continue restoring with subsequent logs. Listing 24.3 shows an example of trying a complete recovery of a database with a lost data file. The example system is missing an archived log file, log #200.
Listing 24.3 Oracle Server Manager Release 2.1.3.0.0ProductionCopyright (c) Oracle Corporation 1994, 1995. All rights reserved. Oracle7 Server Release 7.1.6.2.0 - Production Release With the distributed, replication and Parallel Server options PL/SQL Release 2.1.6.2.0 - Production SVRMGR> connect internal; Connected to an idle instance. SVRMGR> startup; ORACLE instance started. Total System Global Area 4383424 bytes Fixed Size 49104 bytes Variable Size 3916528 bytes Database Buffers 409600 bytes Redo Buffers 8192 bytes Database mounted.