Database Administration (MOSC)

MOSC Banner

Instance auto shutdown when host shuts down or reboots

edited Sep 21, 2021 12:47PM in Database Administration (MOSC) 5 commentsAnswered ✓
Hi community,
i've got a goal to set our db to autostart when linux starts, and autoshut when linux shuts down.
So i decided to use "su command" option, creating a script:

/etc/init.d/dbora
#! /bin/sh
# chkconfig: 2345 99 99
# description: Oracle auto start-stop script.
#
# Set ORACLE_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 ORACLE_HOME.

ORA_HOME=/u01/app/oracle/product/11.2.0/dbhome_1
ORA_OWNER=oracle

case "$1" in
'start')
    # Start the Oracle databases:
    # The following command assumes that the oracle login

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center