Anda di halaman 1dari 2

To schedule auto shutdown and startup script , kindly execute below steps as a root

user on both servers linaspsg21 and linaspsg22

1) Create file with name oracle at location /etc/rc.d/init.d :-

$ vi /etc/rc.d/init.d/oracle

Paste all the contents of attached files oracle.txt in above file


and save the same.

2) Change the permission of file :-

$ chmod 755 /etc/rc.d/init.d/oracle

3) Execute below command :-

$ chkconfig --add oracle


$ chkconfig oracle on

Kindly let us know once you execute above steps, so we can verify the same.

Same has been updated on the case 00743800.

For server linaspsg22 currently no database is present on it, after creation of any
database in future, then only need to add entry of new database in /etc/oratab file
(can be done by DBA team).

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++
oracle:OMS:/etc/init.d # cat oracle
# chkconfig: 345 99 10
# description: Oracle auto start-stop script.
# Set ORA_OWNER to the user id of the owner of the # Oracle database in ORA_HOME.
. /etc/rc.d/init.d/functions
ORA_OWNER=oracle
RETVAL=0

case "$1" in
'start')
# Start the Oracle databases:
# The following command assumes that the oracle login
# will not prompt the user for any values
su - $ORA_OWNER -c
"/export/home/oracle/admin/OMS/scripts/listener_start.sh"
su - $ORA_OWNER -c "/export/home/oracle/admin/OMS/scripts/ora_start.sh"
touch /var/lock/subsys/oracle
;;
'stop')
# Stop the Oracle databases:
# The following command assumes that the oracle login
# will not prompt the user for any values
su - $ORA_OWNER -c "/export/home/oracle/admin/OMS/scripts/listener_stop.sh"
su - $ORA_OWNER -c "/export/home/oracle/admin/OMS/scripts/ora_stop.sh"
rm -f /var/lock/subsys/oracle
;;
*)
echo $"Usage: $0 {start|stop}"
RETVAL=1
esac
exit $RETVAL

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Hello Ranjani ,

We need below output from Infra team :-

As a Root User :-

chkconfig --list |grep oracle

After the above output , DBA team to check whether the oracle service is configured
for Runlevel 3,4,5.The server is currently booted in runlevel 3.

Below test needs to be done in coordination with the Infra Team and DBA Team on
server 172.29.2.142 :-

1) Execute the below command as a root user :-


service oracle stop
2) DBA Team to check whether the OSKOMS Database has been stopped after
execution of the above command by INFRA Team
3) Execute the below command as a root user :-
service oracle start
4) DBA Team to verify whether the OSKOMS Database should been started
after execution of the above command by INFRA Team.

If the above test is successful then DBA Team to implement the above script to the
Production servers.

NOTE :- OSKOMS UAT Database running on server 172.29.2.142 will not be available
during the above test.

++++++++++++++++++++++++++++++++++++++

Anda mungkin juga menyukai