03-09-2010
Script to force Oracle database shutdown when shutdown immediate does not work
I have Oracle 9i R2 on AIX 5.2. My Database is running in shared server mode (MTS).
Sometimes when I shutdown the database it shutsdown cleanly in 4-5 mints and sometimes it takes good 15-20 minutes and then I get some ora-600 errors and only way to shutdown is by opening another session and doing the shutdown abort.
Is there a way/workaround so I can do this with some script like if my database is not shutdown properly in 15-20 minutes since I issue "shutdown immediate" command it kicks of shutdown abort command? Something like this
**************************************************
"checks for smon/PMON if database still up then connects and issues shutdown abort"
**************************************************
Thanks
Last edited by aixhp; 03-10-2010 at 04:11 PM..
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
Hi Guys,
I want to execute few of my bash script, so that whenever someone calls shutdown now -r command, I want my script to execute first before shutting down.
Any help please?????
I've just started playing with the unix system, so far its been brilliant.... (10 Replies)
Discussion started by: alpha_manic
10 Replies
2. UNIX for Dummies Questions & Answers
I want to make a script to shutdown a unixware computer from other user then root. In Sco version i use "as root" but in the unixware i don't know.
Please help me.
10x (12 Replies)
Discussion started by: kelu
12 Replies
3. HP-UX
Hi,
I am on Alpha Server with HP Tru64 system.
I wish to setup shutdown to automatically and cleanly shutdown informix during the shutting down of the system.
Ie. I was trying to use rc0.d to do this but failed.
Has anyone tried doing this before? I already have the script and linked it
to... (0 Replies)
Discussion started by: kingsto88
0 Replies
4. UNIX for Advanced & Expert Users
Hi,
Iam calling 3 sql scripts through one shell script 'rmia.sh'.
Till now this was working fine, but last time while calling the SQL scripts,
Oracle was down. But amazingly the exit status was '0' (success)!!!
Below is the shell code:
#!/usr/bin/ksh -x
assign_file asql a.sql 1... (15 Replies)
Discussion started by: ganapati
15 Replies
5. BSD
hi
Howto force shutdown on the notebook with freeBSD before battery is empty? (3 Replies)
Discussion started by: ccc
3 Replies
6. Shell Programming and Scripting
Hi,
We have a requirement wherein we do not want to share the Oracle DB sys and system passwords to be shared with the support desk.
But they will be responsible for starting/shuting down the Database.
Is it possible to write a shell script which will read the sys and system passwords from a... (0 Replies)
Discussion started by: narayanv
0 Replies
7. Solaris
hello,
The command above seems not working on my solaris 8/9 sparc machines.
a. resulted to the ff below when I instead use "shutdown" only.
Broadcast Message from root (pts/1) on "hostname" date..
The system "hostname" will be shut down in 30 seconds
THE SYSTEM bdosg IS BEING SHUT... (4 Replies)
Discussion started by: lhareigh890
4 Replies
8. Shell Programming and Scripting
I am going to create shutdown database script. We have dabase shutdown script.
But i need take dabase which online and make it down.
I got user id which needs to dabase to down
ID=`ps -ef | grep -i pmon | grep -v grep | awk '{print $1}'` (
got orace side
DB=`ps -ef | grep -i pmon |... (1 Reply)
Discussion started by: allwin
1 Replies
9. Shell Programming and Scripting
Please tell me how to convert below program from shell script to perl. Same commands need to use in shutdown, just need program help for startup.
export ORACLE_BASE=/home/oracle1
lsnrctl start lndb1
sqlplus '/ as sysdba'
startup; (2 Replies)
Discussion started by: learnbash
2 Replies
10. Solaris
Hi,
I've this Oracle database version:
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
Oracle is install in a SunOS DBSERVER1 5.11 11.2 sun4v sparc sun4v cluster (Not RAC environment)
DBSERVER1 is node active and DBSERVER2 is node inactive
... (4 Replies)
Discussion started by: db_senior
4 Replies
LEARN ABOUT ULTRIX
shutdown
shutdown(8) System Manager's Manual shutdown(8)
Name
shutdown - close down the system at a given time
Syntax
/etc/shutdown [ -k ] [ -r ] [ -h ] [ -o ] time [ warning-message ... ]
Description
The command provides an automated shutdown procedure that a superuser can use to notify users when the system is shutting down.
The time is the time at which will bring the system down. It may be the word `now', indicating an immediate shutdown, or specify a future
time in one of two formats: + number or hour : min. The first form brings the system down in number minutes. The second brings the system
down at the time of day indicated, using a 24-hour clock format.
At intervals which get shorter as shutdown nears, warning messages are displayed at the terminals of all users on the system. Warning mes-
sages are also sent to users who are logged in to a remote system that has mounted a file system or directory from the local system using
NFS. Five minutes before shutdown, or immediately if shutdown is timed for less than five minutes, logins are disabled by creating and
writing a message there. If this file exists when a user attempts to log in, prints its contents and exits. The file is removed just
before exits.
At shutdown time, a message is written in the file This message contains the time of shutdown, who ran shutdown, and the reason. Then, a
terminate signal is sent at to bring the system to single-user state.
If the or options are used, then executes or avoids shutting the system down (respectively). The option is for use by only. It indicates
to that it is being called by and not to return to the user.
You should place the time of the shutdown and the warning message in Use the message to inform the users about when the system will be back
up and why it is going down.
Restrictions
You can kill the system only between now and 23:59, if you use the absolute time for shutdown.
Files
Tells login not to let anyone log in
Log file for successful shutdowns
See Also
login(1), wall(1), halt(8), opser(8), reboot(8), rwalld(8c)
shutdown(8)