
Protecting Oracle Database Appliance - Tape Backup with Oracle Secure Backup
16
Prior to running RMAN the correct environment variables must be set for the oracle user on the database server
which will be used to execute the RMAN script. This example demonstrates setup and execution of RMAN from
database server hamms1.
1. Switch user to the oracle user - su - oracle
2. Modify the user environment variables and specify the following parameters to match your environment
(bash shell being used in this example):
vi .bash_profile
export ORACLE_HOME=/u01/app/oracle/product/11.2.0.3/dbhome_1
export PATH=$ORACLE_HOME/bin:.:$PATH
export ORACLE_SID=isr1
Connect to RMAN with the appropriate credentials to verify environment is set correctly.
Example: rman target sys/welcome1@hamms1/isr
RMAN Script
Create an RMAN script containing the following entries to backup the data files, archive logs, and controlfile.
Allocate tape channels for each drive in your configuration and round robin the connection to each of the database
servers (this is how load balancing is achieved). Also be sure to release each tape channel after each section of the
backup. For our example we created the script under /oracleBU/osb on host hamms1:
RUN {
ALLOCATE CHANNEL ch00 TYPE 'SBT_TAPE' CONNECT='sys/welcome1@isr1';
ALLOCATE CHANNEL ch01 TYPE 'SBT_TAPE' CONNECT='sys/welcome1@isr2';
BACKUP AS BACKUPSET INCREMENTAL LEVEL 0 DATABASE INCLUDE CURRENT
CONTROLFILE PLUS ARCHIVELOG;
RELEASE CHANNEL ch00;
RELEASE CHANNEL ch01;
}
Required tnsnames.ora Changes
In order to evenly spread the backup load across each of the database servers, the database server executing the
RMAN script (hamms1 in this example) must be able to open RMAN channels on the other database server. This
requires modifications to the tnsnames.ora file on each database server.
1) Modify the /u01/app/oracle/product/11.2.0.3/dbhome_1/network/Administrative/tnsnames.ora file with a
text editor
Original file:
# tnsnames.ora Network Configuration File:
/u01/app/oracle/product/11.2.0.3/dbhome_1/network/Administrative/tnsnames.ora
# Generated by Oracle configuration tools.
ISR =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = hamms-scan)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = isr)
Kommentare zu diesen Handbüchern