15. Update the repository:
RMAN> reset database;Two-Minute Drill
Recover from a Lost TEMP File
• A temporary tablespace cannot be placed in backup mode.
• Tempfiles would not usually be restored—it is quicker to drop and recreate
them.
Recover from a Lost Redo Log Group
• Damaged log file members, or entire groups, can be dropped and recreated,
or cleared (which comes down to the same thing).
• Online redo log files must not be backed up for an open backup, and they
need not be backed up for a closed backup—if the database is shut down
cleanly.
Recover from the Loss of a Password File
• As a rule, the password file need not be backed up. Keep a copy of the
command used to create it, and recreate if necessary.
Perform User-Managed Complete Database Recovery
• The SQL*Plus command is RECOVER DATAFILE (in open mode, unless the
datafile is critical) or RECOVER DATABASE (in mount mode only).
• The steps for complete recovery of a noncritical datafile are
Take the file offline.
Restore the file.
Recover the file.
Bring the file online.
• The steps for complete recovery of a critical datafile are
Mount the database.
Open the database.
Perform User-Managed Incomplete Database Recovery
• The options are
Until a specified time
Until an SCN
Until the cancel command is submitted at the recovery prompt
• The steps are
Restore all datafiles (and the controlfile if necessary).
Recover the database UNTIL . . . .
Open the database with RESETLOGS.
• If using RMAN, the repository must be updated with RESET DATABASE.
Perform User-Managed Backups
• In noarchivelog mode, a complete backup while the database is shut down is
the only option.
• In archive log mode, there are three steps to an open backup:
ALTER DATABASE BACKUP CONTROLFILE.
Archive the online redo logs.
Copy the datafiles, while their tablespace is in backup mode.
Identify the Need for Backup Mode
• In backup mode, datafiles can be safely copied.
• When backup mode is enabled:
The datafile header is frozen.
The tablespace is checkpointed.
The redo generation algorithm switches from change vectors to complete
blocks.
• An open backup may contain fractured blocks, but these can be replaced with
read-consistent blocks from the redo stream.
Back Up and Recover a Controlfile
P AR T III
• Unless the database is closed, the controlfile can only be backed up with the
ALTER DATABASE BACKUP CONTROLFILE command.
• The easiest way to recover from the loss of a controlfile copy is to use another
copy.
• A binary backup of the controlfile can be restored.
• A controlfile can be recreated with the CREATE CONTROLFILE command,
if all the relevant information regarding datafiles and online redo log files is
available.
Self Test
Bạn đang xem 15. - OCA OCP ORACLE DATABASE 11G A LL IN ONE EXAM GUIDE P74 PPS