Reference Architecture: Consolidating Oracle Databases with Secure Resource Partitions in a Serviceguard Cluster Whitepaper
22
Task 4: Modifying listener.ora
Although a process running in an SRP only has access to the SRP IP address (by default), it is a best
practice to restrict processes to listen only on the SRP IP address.
1. Modify the Oracle listener configuration to bind only to the SRP IP address by setting the HOST
parameter to the IP address of the SRP:
$ cat $ORACLE_HOME/network/admin/listener.ora
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.1.1.11)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
)
SID_LIST_LISTENER=
(SID_LIST=
(SID_DESC=
(SID_NAME=MKTPRD)
(ORACLE_HOME=/var/hpsrp/MKTPRD/u01/app/product/11.1.0/db_1)
)
)
)
2. After restarting the listener, use the netstat –an command to verify that it is only listening on
the SRP IP address:
$ netstat -an | grep 1521 | grep LISTEN
tcp 0 0 192.1.1.11.1521 *.* LISTEN
Task 5: Automatically starting up and shutting down the database
To have the database started or stopped with the SRP, place an RC script in the SRP private init
directory. The startup/shutdown sequence of the SRP is similar to the way the system initialization is
handled.
Using the sample RC script provided in Appendix B: Oracle RC script:
1. Place the script in the /var/hpsrp/MKTDB/sbin/init.d directory and modify the script variables for
this database.
2. Create symbolic links to RC script for startup and shutdown.
3. Create Oracle start and stop scripts (or use existing scripts).
4. Install and modify RC script (copy script in Appendix B to /tmp/oracle_initscript).
These steps must be done as the root user because non-root users do not have write access to
/var/hpsrp/MKTPRD/sbin
# cp /tmp/oracle_initscript /var/hpsrp/MKTPRD/sbin/init.d/mktprd
# head -8 /var/hpsrp/MKTPRD/sbin/init.d/mktprd
#!/sbin/sh
# ------ DB Settings -------
WHAT='Oracle DB: MKTPRD (11g)'