Reference Architecture: Consolidating Oracle Databases with Secure Resource Partitions in a Serviceguard Cluster Whitepaper

23
ORACLE_HOME=/var/hpsrp/MKTPRD/u01/app/product/11.1.0/db_1
DB_START=/var/hpsrp/MKTPRD/home/ora_mkt/dbstart
DB_SHUT=/var/hpsrp/MKTPRD/home/ora_mkt/dbshut
DB_USER=ora_mkt
5. Create RC symbolic links for automatic start/stop.
# ln -s /var/hpsrp/MKTPRD/sbin/init.d/mktprd
/var/hpsrp/MKTPRD/sbin/rc1.d/K401mktprd
# ln -s /var/hpsrp/MKTPRD/sbin/init.d/mktprd
/var/hpsrp/MKTPRD/sbin/rc2.d/S376mktprd
6. Create start/stop scripts.
$ cat /var/hpsrp/MKTPRD/home/ora_mkt/dbstart
#!/usr/bin/sh
ORACLE_HOME=/var/hpsrp/MKTPRD/u01/app/product/11.1.0/db_1
ORACLE_SID=MKTPRD
$ORACLE_HOME/bin/lsnrctl start
$ORACLE_HOME/bin/sqlplus /nolog <<EOF
connect / as sysdba
startup
quit
EOF
$ cat /var/hpsrp/MKTPRD/home/ora_mkt/dbshut
#!/usr/bin/sh
ORACLE_HOME=/var/hpsrp/MKTPRD/u01/app/product/11.1.0/db_1
ORACLE_SID=MKTPRD
$ORACLE_HOME/bin/lsnrctl stop
$ORACLE_HOME/bin/sqlplus /nolog <<EOF
connect / as sysdba
shutdown immediate
quit
EOF
7. Start the SRP using the srp start command:
# srp -start MKTPRD
***********************************************
Compartment MKTPRD startup in progress
Tue Apr 13 10:52:22 PDT 2010
***********************************************
Configure LAN interfaces.................................... [ OK ]
Mounting file systems in /var/hpsrp/MKTPRD/etc/fstab........ [ OK ]
Starting Oracle DB: MKTPRD (11g)............................ [ OK ]
Starting HP-UX Secure Shell................................. [ OK ]
8. Using the R option to the ps command, display all processes running in the MKTPRD PRM group: