Database Reference
In-Depth Information
Step 3: Recover the database. Once the database data files are restored, the RMAN
RECOVER command is used to start the actual recovery process. During the execution of
the RECOVER command, RMAN will extract the needed archived redo logs (if running in
ARCHIVELOG mode) and apply them as needed. Obviously, during a NOARCHIVELOG-
mode recovery, no redo will be applied (and in fact, you will indicate this when you do the
recovery, as you will see later in this chapter). Once the RECOVER command has completed its
job, you will be returned to the RMAN prompt so you can complete the recovery process by
opening the database or bringing the tablespace or data file online.
As with the RESTORE command, the RECOVER command has a number of variations, such
as RECOVER DATABASE , RECOVER TABLESPACE , and RECOVER DATAFILE . You will see these
demonstrated throughout the rest of this chapter.
Step 4: Complete the recovery. If your restore and recovery required the database to be
in MOUNT mode, then all you need to do is open the database for business and you are
the hero of the day. To do so, issue the ALTER DATABASE OPEN command from the RMAN
prompt. If you did everything correctly, your database should open and your users will erect
a statue in your honor. At one time we had upwards of 15 statues erected in our honor, only
to be toppled by DBAs who succeeded us. Statues are, in the end, highly overrated.
Of course, if you didn't get your backup strategy right, your users may well throw another
party in your honor—the going-away party, if your boss even allows that. So, you'll want
to make sure you get it right the first time and even test it a few times before the real deal
comes to town.
If your restore and recovery permitted the database to be open, then you probably had a
tablespace or a data file offline. In this case, you will use the RMAN SQL command, embed-
ding the ALTER TABLESPACE ONLINE or ALTER DATAFILE ONLINE command within the confines
of that command. With the successful completion of those commands, your recovery will be
complete and you can celebrate!
Now that we have shown you the basic pattern for recovering from a downed database,
let's talk more specifically about the different kinds of database recoveries you will encounter.
In this chapter the recoveries we are contemplating are on the same
hardware platform. In Chapter 6 we will address restoring and recovering
databases to a new host, including cross-platform database recoveries.
Recovering a Database in
NOARCHIVELOG Mode
Recovering your NOARCHIVELOG-mode database is perhaps the easiest thing you could
do. There is no application of redo to worry about, only restoring the database data files and
getting the database up and running. One important thing to understand is that your best
Search WWH ::




Custom Search