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 ... ...