Hi All,
I am trying to configure to auto startup/shutdown, Oracle 12c database, upon server reboots. Please see the following steps(from blogs.oracle.com) that I have requested my Linux admin to implement. We have tested it, it looks it is working, but when I look at the database alert log, I see the database is shutting in abort mode "Shutting down instance (abort) (OS id: XXXXX)". Is there a way we take the database down in normal mode? Please advise.
Steps
*******
1. Please create a file “dbora” under “/etc/init.d/” as root
#!/bin/sh
# chkconfig: 345 99 10
# description: Oracle auto start-stop script.
#
# 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=/u01/app/oracle/product/12.2.0/dbhome_1
ORA_OWNER=oracle
case "$1" in
'start')
# Start the Oracle databases:
# The following command assumes that the oracle login
# will not prompt the user for any values
# Remove "&" if you don't want startup as a background process.
su – $ORA_OWNER -c "lsnrctl start"
su $ORA_OWNER -c "$ORA_HOME/bin/dbstart $ORA_HOME" &
touch /var/lock/subsys/dbora
;;
'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 $ORA_HOME"
su – $ORA_OWNER -c "lsnrctl stop"
rm -f /var/lock/subsys/dbora
;;
esac
2. Use the chmod command to set the privileges to 750.
chmod 750 /etc/init.d/dbora
3. As root, associated the dbora service with the appropriate run levels and set it to auto-start using the following command:
chkconfig –add dbora
thanks