1752795 Members
6136 Online
108789 Solutions
New Discussion юеВ

Re: Oracle not stopping.

 
UnixT
Frequent Advisor

Oracle not stopping.

Hi All,

I have a HP UX server running with 11.31 and having oracle. While we try to reboot the system by giving shutdown -ry 0, it gives the error as below.

Fatal server error:
Cannot establish any listening sockets - Make sure an X server isn't already running
mwm: Another window manager is running on screen 0
mwm: Unable to manage any screens on display.
_XSERVTransSocketINETCreateListener: ...SocketCreateListener() failed
_XSERVTransMakeAllCOTSServerListeners: server already running
and here the oracle strucks.........

Here the Oracle strucks....

-------------------------------------------------
Stopping Oracle Enterprise manager 10g AS console
-------------------------------------------------
Oracle Enterprise Manager 10g Application Server Control Release 10.1.2.3.0
Copyright (c) 1996, 2005 Oracle Corporation. All rights reserved.
http://cbpux30.ipcbpr.com:1156/emd/console/aboutApplication

Stopping Oracle Enterprise Manager 10g Application Server Control ...
Cannot determine Oracle Enterprise Manager 10g Application Server Control process; /oracle_base/oas/bin/emctl.pid does not exist.
Oracle Enterprise Manager 10g Application Server Control may not be running.
-----------------------------
Stopping 10g IAS
-----------------------------
opmnctl: stopping opmn and all managed processes...




Can anyone help me on this
6 REPLIES 6
UnixT
Frequent Advisor

Re: Oracle not stopping.

the scripts in init.d are as below...


cbpux30
/usr/sbin $ cat /sbin/init.d/oracle
#!/sbin/sh
#
# @(#)B.11.11_LR
#
# NOTE: This script is not configurable! Any changes made to this
# script will be overwritten when you upgrade to the next
# release of HP-UX.
#
# WARNING: Changing this script in any way may lead to a system that
# is unbootable. Do not modify this script.

#
#
#

# Allowed exit values:
# 0 = success; causes "OK" to show up in checklist.
# 1 = failure; causes "FAIL" to show up in checklist.
# 2 = skip; causes "N/A" to show up in the checklist.
# Use this value if execution of this script is overridden
# by the use of a control variable, or if this script is not
# appropriate to execute for some other reason.
# 3 = reboot; causes the system to be rebooted after execution.
# 4 = background; causes "BG" to show up in the checklist.
# Use this value if this script starts a process in background mode.

# Input and output:
# stdin is redirected from /dev/null
#
# stdout and stderr are redirected to the /etc/rc.log file
# during checklist mode, or to the console in raw mode.

PATH=/usr/sbin:/usr/bin:/sbin
export PATH

# NOTE: If your script executes in run state 0 or state 1, then /usr might
# not be available. Do not attempt to access commands or files in
# /usr unless your script executes in run state 2 or greater. Other
# file systems typically not mounted until run state 2 include /var
# and /opt.

rval=0

# Check the exit value of a command run by this script. If non-zero, the
# exit code is echoed to the log file and the return value of this script
# is set to indicate failure.

set_return() {
x=$?
if [ $x -ne 0 ]; then
echo "EXIT CODE: $x"
rval=1 # script FAILed
fi
}

# Kill the named process(es).
# $1=

killproc() {
pid=`ps -el | awk '( ($NF ~ /'"$1"'/) && ($4 != mypid) && ($5 != mypid) ){ print $4 }' mypid=$$ `
if [ "X$pid" != "X" ]; then
if kill "$pid"; then
echo "$1 stopped"
else
rval=1
echo "Unable to stop $1"
fi
fi
}


case $1 in
'start_msg')
# Emit a _short_ message relating to running this script with
# the "start" argument; this message appears as part of the checklist.
echo "Starting the ORACLE subsystem"
;;

'stop_msg')
# Emit a _short_ message relating to running this script with
# the "stop" argument; this message appears as part of the checklist.
echo "Stopping the ORACLE subsystem"
;;

'start')

# source the system configuration variables
if [ -f /etc/rc.config ] ; then
. /etc/rc.config
else
echo "ERROR: /etc/rc.config defaults file MISSING"
fi

# Check to see if this script is allowed to run...
if [ $ORACLE_START != 1 ]; then
rval=2
else

# Execute the commands to start your subsystem
echo "Starting Oracle Net"
su - oracle -c "lsnrctl start"
echo "Finished Starting Oracle Net"
sleep 5
echo "Starting Oracle Databases"
su - oracle -c dbstart
echo "Finished Starting Oracle Databases"
sleep 60

echo "Pin all packages, procedures, and functions in databases"
#su - oracle -c "/u01/dba/oracle/scripts/db_startup_pin.sh"
echo "Start the standby databases for PROD and CONF"
su - oracle -c "/u01/dba/oracle/scripts/start_standby_db.sh"
set_return
fi
;;

'stop')
# source the system configuration variables
if [ -f /etc/rc.config ] ; then
. /etc/rc.config
else
echo "ERROR: /etc/rc.config defaults file MISSING"
fi

# Check to see if this script is allowed to run...
if [ $ORACLE_START != 1 ]; then
rval=2
else
:
# Execute the commands to stop your subsystem

echo "stopping Oracle Net"
su - oracle -c "lsnrctl stop"
sleep 5
echo "shutting down Oracle"
su - oracle -c dbshut.mod
echo "Stop the standby databases for PROD and CONF"
su - oracle -c "/u01/dba/oracle/scripts/stop_standby_db.sh"
set_return

fi
;;

*)
echo "usage: $0 {start|stop|start_msg|stop_msg}"
rval=1
;;
esac

exit $rval
cbpux30


Entry in rc are as shown down

/sbin/rc1.d $ ls -l K100oracle
lrwxr-xr-x 1 root sys 19 Jul 20 2008 K100oracle -> /sbin/init.d/oracle
cbpux30
/sbin/rc1.d $ ll /sbin/rc2.d | grep -i oracle
lrwxr-xr-x 1 root sys 19 Jul 20 2008 S900oracle -> /sbin/init.d/oracle
cbpux30

RAC_1
Honored Contributor

Re: Oracle not stopping.

I will have DBAs, shutdown oracle and then see what is going wrong.

For X errors, do dr_dt and see if you have any errors or not.
There is no substitute to HARDWORK
UnixT
Frequent Advisor

Re: Oracle not stopping.

But it is for testing automatic shutdown and starting of oracle while booting /shutting the system.
T G Manikandan
Honored Contributor

Re: Oracle not stopping.

Here you need to check what is there with the Oracle shutdown script.


when the script uses

Just "shutdown" then it will wait for ever list all the client connections get disconnected.

you need to change the script to use

"shutdown immediate" which will terminate all client connections , flush the log files and shutdown oracle.

I guess that would be the issue here.Please check.

Also,sometimes if this database is used heavily, you need to wait till oracle flushes the log files and writes into the database.
OldSchool
Honored Contributor

Re: Oracle not stopping.

the mwm stuff refers to Xwindows. you're starting at run level 2, and shutting down at 1? is X available at that level?

i'd have thought 2/3 transition, but I could be mistaken. You might try the "databases" forum as well.
Steven E. Protter
Exalted Contributor

Re: Oracle not stopping.

Shalom,

By default the dbshut process that ships with oracle does not do a shutdown immediate, which is what is needed to shut Oracle down properly.

Best practice here is to modify dbshut

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com