Re: [Q] How can I add dbshut in shutdown process under AIX?

From: Dave Watson <watson_at_access.mountain.net>
Date: 1996/12/10
Message-ID: <58jtg8$9ao_at_news.mountain.net>#1/1


: Huy Vu wrote:
: > 
: > I try to find out where can I add the script 'dbshut' to shutdown the
: > oracle databases automatically every time the system shutdown for our
: > server AIX 4.1.4. I'm newbie on AIX platform.

I'm running 3.2.5.

I aliased shutdown in my .kshini so it just reminds me to stop oracle before I run the shutdown command. Since I don't run the shutdown command that often I always seem to forget to stop oracle first. After I get the message I shutdown oracle by using the script at the end of this posting. The script is supposed to be better than the dbshut command.

After stopping oracle I then shutdown by using the complete path /usr/sbin/shutdown.

This addeds a couple steps but I don't run shutdown that often and it stops from screwing up oracle databases.



#!/bin/ksh

PATH=/usr/bin:/etc:/usr/sbin:/usr/ucb:/sbin:/usr/local/bin:/usr/oracle/bin

# Define current oracle database instance
export ORACLE_SID="A"

# Define location of Oracle home

export ORACLE_HOME="/usr/oracle"
export ORAENV_ASK="NO"

#
# Start ORA*DBA and disconnect "immediate" which disconnects all
# current users without waiting. Then startup again and do a shut down
# normal to ensure that all Oracle files and transactions have been
# properly dealt with. This seems strange to shut, start then shut,
# but a call to Oracle confirms that this is the
# recommended method. Strange that this method is not documented in
# the Oracle manuals.
#

/usr/oracle/bin/sqldba <<EOF
connect internal
shutdown immediate
startup
shutdown normal
exit
EOF exit 0


--
Dave Watson
watson_at_access.mountain.net
Received on Tue Dec 10 1996 - 00:00:00 CET

Original text of this message