Databases Reference
In-Depth Information
backup device type disk ... with tag 'prod' database: This command creates a new
level 1 incremental backup tagged prod . The very first time this script runs (day 1), it creates
a level 0 incremental backup (a full database backup), since there's none prior to this. On
all following days, this command generates a new level 1 incremental backup thatwill be
available for step 1 on the next day.
backup archivelog all not backed up to sbt: This command backs up all archive logs
not previously backed up to tape.
backup backupset all: The very first time this script runs, it copies any previously existing
backups to tape. On subsequent runs, the command will back up all archived log and
incremental backups in the recovery area to tape.
RMAN can use the up-to-date full database copy and the current incremental backups to recover the database to
any point within the past day. It can use the archived redo logs and the online redo logs to recover the database to any
point in time during the current day.
Recovering from the Loss of Data Files
Problem
You want to recover from the loss of data files in a standby environment.
Solution
Use the following steps to recover a standby database data file:
1.
Start RMAN and connect to the standby database as well as to the recovery catalog:
RMAN> connect target /
RMAN> connect catalog rman/rman@catdb
2.
Connect to the standby database through SQL*Plus and stop the managed recovery
process (MRP):
RMAN> alter database recover managed standby database cancel;
3.
Establish the current SCN of the standby database:
SQL> select max(next_change#)+1 until_scn
from v$log_history
where resetlogs change#=(select resetlogs change# from v$database);
UNTIL_SCN
----------------
967786
4.
Restore the data files using the RMAN restore command:
RMAN> restore datafile 6;
 
Search WWH ::




Custom Search