RAC Backup and Recovery Using RMAN
RAC Backup and Recovery Using RMAN
RAC Backup and Recovery Using RMAN
243760.1
Objectives:
===========
Configuration:
==============
a. NODE 1: thread 1
b. NODE 2: thread 2
4. Connect using RMAN to verify and set the controlfile persistent configuration.
The controlfiles are shared between the instances so configuring the control-
file on node 1 also sets it for all nodes in the RAC cluster.
b. Default Configuration
Note: these above can be enhanced with the "until time" clause as well as
the archivelog backups using "not backed up x times" to cut down on
many copies of a log in several backupsets. Then continuing with SMR
Server Managed Recovery use the change archivelog from...until...delete
to remove old logs no longer needed on disk.
Complete Recovery
a. With the database mounted on the node1 and nomount on node2 connect
to the target and catalog using RMAN.
This script will restore and recover the database completely and open.
All previous backup will still be available for use because there was
not RESETLOGS command given.
run {
restore database;
recover database;
alter database open;
}
Incomplete Recovery
Note: If you are using instance registration the database must be mounted to
register with the listener. This means you must use the current control
file for restore and recovery or setup a dedicated listener if not
already done. RMAN requires a dedicated server connection and does not
work with using instance registration before mounting the controlfile.
Using the autobackup controlfile feature requires the DBID of the
TARGET database. It must be set when the database is not mounted and
only the controlfile and spfile (in 9.2>) can be restored this way.
c. start rman
RUN
{
SET CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE disk TO '/rman/V920/%F';
ALLOCATE CHANNEL d1 DEVICE TYPE disk;
RESTORE CONTROLFILE FROM AUTOBACKUP
MAXSEQ 5 # start at sequence 5 and count down (optional)
MAXDAYS 5; # start at UNTIL TIME and search back 5 days (optional)
MOUNT DATABASE;
}
MAX(SEQUENCE#)
--------------
25
f. If using LMT Temporary tablespace the controlfile will have the syntax
to add the tempfile after recovery is complete.
Example:
# Commands to add tempfiles to temporary tablespaces.
# Online tempfiles have complete space information.
# Other tempfiles may require adjustment.
ALTER TABLESPACE TEMP ADD TEMPFILE '/dev/usupport_vg/rV92B_temp_01.dbf'
SIZE 41943040 REUSE AUTOEXTEND OFF;
# End of tempfile additions.
#
run {
set until sequence 14 thread 2;
restore database;
recover database;
alter database open resetlogs;
}
run {
allocate channel d1 type disk connect 'sys/rac@node1';
allocate channel d2 type disk connect 'sys/rac@node2';
set until sequence 14 thread 2;
restore controlfile;
alter database mount;
release channel d1;
release channel d2;
}
b. Backup Archivelog