Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Immediate shutdown in progress

Status
Not open for further replies.

SpiritOfLennon

IS-IT--Management
Oct 2, 2001
250
GB
Hi,
I am having problems with an Oracle 8.1.7 database running on HP-UX 11.00. We have a script ( below ) that is designed to shut the database down every night to back it up. However on occasion ( probably once every month ) when we return in the morning the database has failed to shutdown with the message "immediate shutdown in progress". We have to use shutdown abort to stop Oracle but then cannot get the listener to restart without carrying out a full server reboot. I have written a script to log all processes from v$session prior to the attempted shutdown immediate process however nothing stands out as being the cause of the problem. Can anybody provide any suggestions or advise as to how to resolve the issue?

su oracle -c /oracle/script/check_process.sh
su oracle -c /oracle/8.1.7/bin/svrmgrl < /oracle/script/stopdb
./oracle/script/backupdb
su oracle -c /oracle/8.1.7/bin/svrmgrl < /oracle/script/startdb

check_process.sh consists of

ORACLE_HOME=/oracle/8.1.7;export ORACLE_HOME
ORACLE_SID=vwsuk;export ORACLE_SID
ORACLE_BASE=/oracle;export ORACLE
PATH=$PATH:$ORACLE_HOME/bin
DATE=`date +%A`
{
echo &quot;truncate table vsession_&quot;$DATE&quot;;&quot;
echo &quot;insert into vsession_&quot;$DATE&quot; select * from vsession_view;&quot;
echo &quot;commit;&quot;
} | sqlplus -S user/pass

stopdb consists of
connect internal
shutdown immediate
exit

backupdb is an fbackup command to back up the relevant database files

startdb consists of
connect internal
startup open
exit

Thanks

SOL
I'm only guessing but my guess work generally works for me.
 
Use hot backups :)

What the error you get when trying to restart the listener ? - I've never had to restart a server before to get that going !

Alex
 
We had the same type of problem with 8174 where the database hangs when doing a shutdown immediate.

I know it is not the best, but we did:
alter system flush shared_pool
alter system switch logfile
alter system checkpoint
shutdown abort
startup restrict
shutdown normal

to get around the problem. I read somewhere that 817 does this sometimes, do not know if it is a bug or something. Strange that it only happens once in a month or so.

What error are you getting when trying to startup the listener?
 
Hi all thanks for the advice. I can't give any info on the error on the listener but the error preceding this was &quot;End of file on communication channel&quot; which implied a listener problem, hence the reason for trying to stop and start the listener. I too have discovered that it seems to be a bug with 817. I've written the following work around as I'm not happy about shutdown abort every night. You're free to use it.

cat /dev/null > /oracle/script/mail.log
su oracle -c svrmgrl < /oracle/script/stopdb&
# Wait for ten minutes and then test
sleep 600
#Check whether the oracle processes are running for the database
STATUS=`ps -fu oracle |grep &quot;ora_[a-z]*_$DBNAME&quot;`
# Test to see if the exit status of the STATUS command if null and if so
# run the abort routine
if [ $? = 0 ]; then
echo &quot;Immediate shutdown failed initiating abort routine&quot; > /oracle/script/mail.log
su oracle -c svrmgrl > /dev/null <<-EOF
connect internal
alter system switch logfile;
shutdown abort;
exit
EOF

su oracle -c svrmgrl > /dev/null <<-EOF
connect internal
startup restrict;
exit
EOF

su oracle -c svrmgrl > /dev/null <<-EOF
connect internal
shutdown immediate;
exit
EOF
fi

./oracle/script/backupdb
su oracle -c /oracle/8.1.7/bin/svrmgrl < /oracle/script/startdb

SOL
I'm only guessing but my guess work generally works for me.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top