netbackup agent for oracle configuration
TRANSCRIPT
Netbackup agent for Oracle Configuration
Pre-work:
Infrastructure Details:
Master Server: usg4.ptc.com, running 7.1.0.3
Client: moctestvm, running 7.1.0.3 (Oracle host)
Configuration to be done on Oracle host – moctestvm:
Create necessary groups and a user
groupadd oinstall groupadd dba useradd -g oinstall -G dba -d /export/home/oracle -s /usr/bin/bash oracle passwd oracle
Create necessary folder for the installation
mkdir -p /export/home/oracle/product/11.2.0/db_1 mkdir /export/home/oracle/tmp chown -R oracle:oinstall /export/home/oracle
Change kernel parameters
projadd -U oracle -K "project.max-shm-memory=(priv,4g,deny)" oracle projmod -sK "project.max-sem-nsems=(priv,256,deny)" oracle projmod -sK "project.max-sem-ids=(priv,100,deny)" oracle projmod -sK "project.max-shm-ids=(priv,100,deny)" oracle echo "set maxuprc=16384" >> /etc/system echo "set max_nprocs=30000" >> /etc/system echo "set shmsys:shminfo_shmmax=4294967295" >> /etc/system
Download and Install binaries:
Netbackup Client 7.1.0.3 – https://fileconnect.symantec.com/LangSelection.jsp
Download Oracle 11g R2 binaries using this link http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html
Install Oracle 11g R2 on Oracle host – moctestvm.
Note important locations/variables of Oracle:
ORACLE_HOME=/d00/export/home/oracle/app/oracle/product/11.2.0/dbhome_3
ORACLE_DATA=/d00/export/home/oracle/app/oracle/oradata
ORACLE_SID=orcl
Oracle DB Name=orcl
Oracle DB Password=orcl
Oracle Access URL=https://moctestvm:1158/em
Configuration Starts:
1. Log on to moctestvm as “Oracle” user2. Set the environment variables and path for Oracle on moctestvm under env
export ORACLE_SID=orcl
export ORACLE_HOME=/d00/export/home/oracle/app/oracle/product/11.2.0/dbhome_3
ORACLE_HOME=/d00/export/home/oracle/app/oracle/product/11.2.0/dbhome_3
PATH=/d00/export/home/oracle/app/oracle/product/11.2.0/dbhome_3/bin
3. Log on to Oracle server and bring the database down4. After the database is down, link the RMAN with the netbackup binaries. Browse to
“/usr/openv/netbackup/bin/oracle_link”
Wed Mar 28 13:40:54 EDT 2012
All Oracle instances should be shutdown before running this script.
Please log into the Unix system as the Oracle owner for running this script
Do you want to continue? (y/n) [n] y
LIBOBK path: /usr/openv/netbackup/bin
ORACLE_HOME: /d00/export/home/oracle/app/oracle/product/11.2.0/dbhome_3
Oracle version: 11.2.0.1.0
Platform type: i386
Linking LIBOBK:
ln -s /usr/openv/netbackup/bin/libobk.so.1 /d00/export/home/oracle/app/oracle/product/11.2.0/dbhome_3/lib/libobk.so
Done
Please check the trace file located in /tmp/make_trace.15349
to make sure the linking process was successful.
5. After the linking is successful, create an “ORACLE” type policy at Netbackup console. 6. Create a script to trigger the RMAN backup to Netbackup. Sample script is like the one shown
below:
$ORACLE_HOME/bin/rman <<EOF > /d00/export/home/oracle/script/log.txt
connect target sys/orcl@orcl
RUN{
ALLOCATE CHANNEL ch00 TYPE 'SBT_TAPE';
SEND 'NB_ORA_CLIENT=moctestvm, NB_ORA_SERV=usg4.ptc.com, NB_ORA_POLICY=Test';
BACKUP DATABASE PLUS ARCHIVELOG;
RELEASE CHANNEL ch00;
}
EOF
Exit
7. Here, in the script above NB_ORA_POLICY parameter equals the Netbackup policy created at the NBU console.