23 April, 2008

Oracle 11g on Gentoo Part 2. dbstart, dbshut and emctl

On Gentoo Wiki, there is a page dedicated for Oracle on Gentoo. You should found a set of rc script to start / stop Oracle instance, Listener, the EM DB console and isqlplus. For 11g, however, those scripts need some adjustment. This post will shows you how.

  1. 11g no longer provide isqlplus, hence the script should not start/stop isqlplus.
  2. Secondly, dbstart and dbshut will manage the start and stop of listener, hence, the rc script should not deal with the listener directly (let dbstart do it).
  3. For dbstart/dbshut in 11g, you need to supply ORACLE_HOME as the 1st argument, just like the following shows:
     oracle> dbstart /u01/app/oracle/product/11.1.0/db_1
    
  4. For emctl, you should pass ORACLE_SID to emctl via environment variable, just like:
     oracle> ORACLE_SID=mydb emctl start dbconsole
    

Finally, you can use my init script for 11g. The files can be downloaded from here.

To use the script,

 root> tar -C / -zxf oracle-11g-gentoo-rc-scripts.tgz
 root> chmod +x /etc/init.d/oracle
 root> vim /etc/conf.d/oracle # edit the ORACLE_HOME, ORACLE_SID

No comments: