Problem with Stop Script during shutdown of o/s

 
Thread Tools Search this Thread
Operating Systems Linux Red Hat Problem with Stop Script during shutdown of o/s
# 1  
Old 08-11-2009
Problem with Stop Script during shutdown of o/s

Friends ,

I create two script for oracle database startup and shutdown .

[oracle@localhost ~]$ cat start.sh
ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1
ORACLE_OWNER=oracle
su - oracle << !
sqlplus / as sysdba << !
startup

[oracle@localhost ~]$ cat stop.sh
ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1
ORACLE_OWNER=oracle
su - oracle << !
sqlplus / as sysdba << !
shutdown immediate

The above scripts are working fine when i run manually . For auto start and stop I just copy yhe above two scripts in the following locations :

1)
cp start.sh /etc/init.d/
cp stop.sh /etc/init.d/
chmod 755 start.sh stop.sh

2)
Then create symbolic link :

ln -s /etc/init.d/start.sh /etc/rc3.d/S99start
ln -s /etc/init.d/start.sh /etc/rc4.d/S99start
ln -s /etc/init.d/start.sh /etc/rc5.d/S99start

ln -s /etc/init.d/stop.sh /etc/rc0.d/K10stop
ln -s /etc/init.d/stop.sh /etc/rc6.d/K10stop

Now using above procedure , the startup script(start.sh) is working fine BUT the shutdown script (stop.sh) is not working .
I can check the start and stop scipt from oracle's alert log file .

Do anybody plz tell me , How can I run the stop script (stop.sh) during shutdown .

Waiting for reply ... ...

Last edited by shipon_97; 08-11-2009 at 05:04 AM..
# 2  
Old 08-11-2009
I'm not sure about why it is failing, as I have not given it a thorough look over, but I do believe that shutdown immediate is bad. There should be a more sane shutdown convention to use.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Stop/start script problem on Solaris-10

I have Big brother script, which start/stop Big Brother processes. Something got change on server and now I am not able to start/stop it. There is no change in script, as I compared it from other server. This service is being managed by bb user (group is also bb). root@tsazdq04:/#... (6 Replies)
Discussion started by: solaris_1977
6 Replies

2. Programming

Problem on capturing system Shutdown

I am having exactly the same problem with https://www.unix.com/programming/129264-application-cleanup-during-linux-shutdown.html but the thread is old and closed. The only difference is that I use sigaction() instead of signal(), which is recommended, as far as I know. This is my code: ... (9 Replies)
Discussion started by: hakermania
9 Replies

3. UNIX for Advanced & Expert Users

Problem relocating to another state with Shutdown

How are you, good afternoon, I do not speak and I do not write in English, and I'm iniciandome in unix / linux on my own, I am using the google translator, my question is this, know what are the shutdown command to change user State: # shutdown -y -g0 -i0 (completely off my system) # shutdown... (8 Replies)
Discussion started by: PrincipianteZ
8 Replies

4. AIX

Please update inittab/rc.shutdown/rc scripts to start/stop mqm (need help Urgent)

HI i need help from seniors on this issue, i need to know how to do this, i need to update 50+ server starting saturday. below is the ticket which i have with full description. Currently MQ Series must be stopped before and started after any reboot. Not having the start/stop as part of... (2 Replies)
Discussion started by: gulamibrahim
2 Replies

5. AIX

stop application befor shutdown

Stop the application before shutdown the server .. I have application need to be started with the system and also need to be stop before shutdown the system This is the path of the application: /usr/appstart /usr/appstop to start the application with the startup of the... (2 Replies)
Discussion started by: Mr.AIX
2 Replies

6. UNIX for Dummies Questions & Answers

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... (7 Replies)
Discussion started by: aixhp
7 Replies

7. Solaris

Server Shutdown Problem

I have a sparc T1 server (I know its old) running Solaris 8, which we use for testing. It has been very slow in response- prompt takes couple of minutes to come up, so I decided to reboot the server but I can reboot it, it is giving following errors when I try to shutdown it down. root@deva:/#... (3 Replies)
Discussion started by: Tirmazi
3 Replies

8. UNIX for Dummies Questions & Answers

Shutdown and Reboot problem

Hi, i have sco openserver 5.0.6 but have a problem with shutdown or reboot commands. The string I use is "shutdown -g0 -y" but the system just hangs on "The sytem is down" . I used to get a "Safe to turn of" but now nothing. Same with "reboot" the sytem just freezes. Any suggestions? (1 Reply)
Discussion started by: VTechman
1 Replies

9. UNIX for Dummies Questions & Answers

sudoers file and Shutdown problem

Help please I have today messed up my sudoers file which means no users can sudo in to our system. I therefore need to do a restore of the file - no problems, I have a backup. Now comes the problem. The system is secure, and nobody seems to know the root password. The system will not... (1 Reply)
Discussion started by: cobdeng
1 Replies

10. UNIX for Advanced & Expert Users

Shutdown Problem

Hi,guys I have a two CPUs server, and the system is linux2.4.6. When the system shutdown,it will stop at the word Power Down. I f I do not select the option "Symmtric multi-processing Support" when I compile the kernel,system will shutdown automatic.But I want to use two CPUs. Anyone can... (1 Reply)
Discussion started by: lance
1 Replies
Login or Register to Ask a Question