I made a new installation of Oracle 12R2 on Linux 7 by following the documentation at https://oracle-base.com/articles/12c/oracle-db-12cr2-installation-on-oracle-linux-6-and-7.
Almost everything worked fine, but automatic startup is having a problem.
After full load of S.O., the listener initializes correctly, but the oracle instance does not:
$sqlplus / nolog
SQL>conn / as sysdba
Connected to an idle instance.
If I start the instance manually, this works.
SQL> startup
ORACLE instance started.
Total System Global Area 3154116608 bytes
Fixed Size 8625656 bytes
Variable Size 788529672 bytes
Database Buffers 2348810240 bytes
Redo Buffers 8151040 bytes
Database mounted.
Open database.
Some environmental information:
#########################################
/home/oracle/.bash_profile
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/.local/bin:$HOME/bin
export PATH
. /home/oracle/scripts/setEnv.sh
#########################################
/home/oracle/scripts/setEnv.sh
# Oracle Settings
export TMP=/tmp
export TMPDIR=$TMP
export ORACLE_HOSTNAME=srvd-orcl1-bhz.JBLTextil.Local
export ORACLE_UNQNAME=orcl1
export ORACLE_BASE=/opt/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/12.2.0.1/db_1
export ORACLE_SID=orcl1
export PATH=/usr/sbin:/usr/local/bin:$PATH
export PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
#########################################
/home/oracle/scripts/start_all.sh
#!/bin/bash
. /home/oracle/scripts/setEnv.sh
export ORAENV_ASK=NO
. oraenv
export ORAENV_ASK=YES
dbstart $ORACLE_HOME
#########################################
/home/oracle/scripts/stop_all.sh
#!/bin/bash
. /home/oracle/scripts/setEnv.sh
export ORAENV_ASK=NO
. oraenv
export ORAENV_ASK=YES
dbshut $ORACLE_HOME
#########################################
/lib/systemd/system/dbora.service
[Unit]
Description=The Oracle Database Service
After=syslog.target network.target
[Service]
# systemd ignores PAM limits, so set any necessary limits in the service.
# Not really a bug, but a feature.
# https://bugzilla.redhat.com/show_bug.cgi?id=754285
LimitMEMLOCK=infinity
LimitNOFILE=65535
#Type=simple
# idle: similar to simple, the actual execution of the service binary is delayed
# until all jobs are finished, which avoids mixing the status output with shell output of services.
RemainAfterExit=yes
User=oracle
Group=oinstall
Restart=no
ExecStart=/home/oracle/scripts/start_all.sh
ExecStop=/home/oracle/scripts/stop_all.sh
[Install]
WantedBy=multi-user.target
#########################################
/etc/oratab
...
orcl1:/opt/u01/app/oracle/product/12.2.0.1/db_1:Y
#########################################
oracle user environment variables:
$echo $ORACLE_SID
orcl1
$echo $ORACLE_HOME
/opt/u01/app/oracle/product/12.2.0.1/db_1
$echo $ORACLE_BASE
/opt/u01/app/oracle
Tanks