 |
|
RMAN backup set Tips
Donald K. Burleson
|
Explanation of RMAN Commands
BACKUP SET COMMAND
RMAN backs up the datafiles, control file, archived log files,
and server parameter files in a RMAN specific format called a backup
piece. In a nutshell, a backup set is a bundle of dbf, ctl and redo
file that can restore a database.
A set of one or more such backup pieces makes up a backup
set. A backup set is created using the BACKUP command.
Creating a Backup Set of
the Primary Database
Since the primary database and the standby
database share the same host, a back up of archived redo log files
will not be created. The following sample script, rman_backup,
creates a backup of all the data files and the control file for the
standby database.
#Script: rman_backup
run {
allocate channel fs1 type disk
format= '/oracle/appsdb/bkp/%u.%p';
backup
incremental level = 0
filesperset = 3
database
include current controlfile for
standby
tag = 'level0backup_ForStandby';
sql "ALTER SYSTEM ARCHIVE LOG
CURRENT";
}
Multiple channels can be allocated to
parallelize the back up process. To execute this script, set the
ORACLE_SID to sid of the target database, connect using
RMAN and call the script.
Creating a Backup Set of
the Primary Database
DBA@jrbk01;
export ORACLE_SID=appsdb
DBA@jrbk01; rman target /
RMAN>@rman_backup
This script will create a backup of the data
files and the control file of the primary database "appsdb" in the
location /oracle/appsdb/bkp directory.
Server
Parameter and Oracle Net Configuration
The modifications required in the server
parameter file and the Oracle Net configuration file are the same as
those described in Chapter 3. The following changes are required in
the server parameter file. It is only a sample, and the actual list
of parameters requiring modification will vary depending on the
configuration.
#Extract from server parameter file of standby
database.
CONTROL_FILES=("/oracle/stdbydb/control/standbycontrol.ctl")
STANDBY_ARCHIVE_DEST=/oracle/stdbydb/arch
LOG_ARCHIVE_FORMAT=appsdb_%t_%s.dbf
LOG_ARCHIVE_START=TRUE
LOG_ARCHIVE_TRACE=255
LOG_ARCHIVE_DEST_1='LOCATION=/oracle/stdbydb/archlocal'
LOG_ARCHIVE_DEST_2='SERVICE=appsdb'
LOG_ARCHIVE_DEST_STATE_2=ENABLE
REMOTE_ARCHIVE_ENABLE=TRUE
STANDBY_FILE_MANAGEMENT=AUTO
DB_FILE_NAME_CONVERT=('/oracle/appsdb','/oracle/stdbydb')
LOG_FILE_NAME_CONVERT=('/oracle/appsdb','/oracle/stdbydb')
INSTANCE_NAME=stdbydb
LOCK_NAME_SPACE=stdby2
|