Doro Doro - 4 months ago 105
SQL Question

Ubuntu 16.04 - Oracle 11g startup issue

Hy, I have installed Ubuntu 16.04 LTS and the database server is starting automatically when machine is opened even I have set to don't.
When I was prompted if I want to run Oracle on startup I taped 'no'.
The configuration from /etc/default/oracle-xe is:

#This is a configuration file for automatic starting of the Oracle
#Database and listener at system startup.It is generated By running
#'/etc/init.d/oracle-xe configure'.Please use that method to modify this
#file

# ORACLE_DBENABLED:'true' means to load the Database at system boot.
ORACLE_DBENABLED=false

# LISTENER_PORT: Database listener
LISTENER_PORT=1521

# HTTP_PORT : HTTP port for Oracle Application Express
HTTP_PORT=8090

# Configuration : Check whether configure has been done or not
CONFIGURE_RUN=true


The configuration from /etc/oratab is:

XE:/u01/app/oracle/product/11.2.0/xe:N


Even 'ORACLE_DBENABLED=false' the Oracle server is starting with operation system.
I can stop it manually, but it is frustrating and if I'm not stopping them, I have to wait 30-40 sec to shut down my computer (even I have ssd, and normally I stay 2, max 3 sec).

May someone can save me from this hell? :D

PS: On Ubuntu 14.04 LTS it was working well with same procedure to install.

Answer

Not sure why the startup script is starting the database instance (or maybe it is only starting lisener and OEM console but not the instance?), since you have a :N marker in the oratab.

However in all cases you might be able to simply delete the init script /etc/init.d/oracle-xe or disable it in systemd: systemctl disable oracle-xe.service.