Now that I have sorted out the performance problems on GRIDCTRL, I still needed to automated the start up and shutdown of the Oracle Listener and Database Instance. And I needed to finalize the clean-up after the removal of OMS from this system.
The documentation in 2.2 Stopping and Starting Oracle Processes assumes that either you are using Oracle Restart as described in About Oracle Restart. Since I did not install this product, I have to look at other options.
The MOS document, How to Automate Startup/Shutdown of Oracle Database on Linux (Doc ID 222813.1), appears to have the correct information about the automatic start-up and shut-down of an Oracle database instance.
Following the procedure in 5.2.8 Enabling and Disabling Database Options, I decided to disable the following database options:
Note that Oracle Partitioning is a requirement for OEM.
I used the following commands, after stopping the database instance:
cd /opt/oracle/app/OracleHomes/db11g/bin ./chopt disable dm ./chopt disable dv ./chopt disable lbac ./chopt disable olap ./chopt disable rat
However, the use of ode_net failed with the following messages:
[oracle@gridctrl bin]$ ./chopt disable ode_net Incorrect option name: ode_net usage: chopt <enable|disable> <option> options: dm = Oracle Data Mining RDBMS Files dv = Oracle Database Vault option lbac = Oracle Label Security olap = Oracle OLAP partitioning = Oracle Partitioning rat = Oracle Real Application Testing e.g. chopt enable rat
After restarting the database instance, the SQL*Plus banner now shows:
[oracle@gridctrl bin]$ sqlplus / as sysdba SQL*Plus: Release 11.2.0.4.0 Production on Sat Mar 1 01:37:09 2014 Copyright (c) 1982, 2013, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - Production With the Partitioning option
Following the procedure laid out in How to Automate Startup/Shutdown of Oracle Database on Linux (Doc ID 222813.1), I created the service script as follows (as root):
cat >/etc/init.d/dbora <<DONE #!/bin/bash # # chkconfig: 35 99 10 # description: Starts and stops Oracle processes # # Set ORA_HOME to be equivalent to the $ORACLE_HOME # from which you wish to execute dbstart and dbshut; # # Set ORA_OWNER to the user id of the owner of the # Oracle database in ORA_HOME. # ORA_HOME=/opt/oracle/app/OracleHomes/db11g ORA_OWNER=oracle case "\$1" in 'start') # Start the TNS Listener su - \$ORA_OWNER -c "\$ORA_HOME/bin/lsnrctl start" # Start the Oracle databases: # The following command assumes that the oracle login # will not prompt the user for any values su - \$ORA_OWNER -c \$ORA_HOME/bin/dbstart # Start the Intelligent Agent if [ -f \$ORA_HOME/bin/emctl ]; then su - \$ORA_OWNER -c "\$ORA_HOME/bin/emctl start agent" elif [ -f \$ORA_HOME/bin/agentctl ]; then su - \$ORA_OWNER -c "\$ORA_HOME/bin/agentctl start" else su - \$ORA_OWNER -c "\$ORA_HOME/bin/lsnrctl dbsnmp_start" fi # Start Management Server if [ -f \$ORA_HOME/bin/emctl ]; then su - \$ORA_OWNER -c "\$ORA_HOME/bin/emctl start dbconsole" elif [ -f \$ORA_HOME/bin/oemctl ]; then su - \$ORA_OWNER -c "\$ORA_HOME/bin/oemctl start oms" fi # Start HTTP Server if [ -f \$ORA_HOME/Apache/Apache/bin/apachectl ]; then su - \$ORA_OWNER -c "\$ORA_HOME/Apache/Apache/bin/apachectl start" fi touch /var/lock/subsys/dbora ;; 'stop') # Stop HTTP Server if [ -f \$ORA_HOME/Apache/Apache/bin/apachectl ]; then su - \$ORA_OWNER -c "\$ORA_HOME/Apache/Apache/bin/apachectl stop" fi # Stop the TNS Listener su - \$ORA_OWNER -c "\$ORA_HOME/bin/lsnrctl stop" # Stop the Oracle databases: # The following command assumes that the oracle login # will not prompt the user for any values su - \$ORA_OWNER -c \$ORA_HOME/bin/dbshut rm -f /var/lock/subsys/dbora ;; 'status') # status if [ -f /var/lock/subsys/dbora ]; then printf "Active\n" else printf "Inactive\n" fi ;; esac # End of script dbora DONE
chmod 755 /etc/init.d/dbora
/sbin/chkconfig --add dbora