0% found this document useful (0 votes)
62 views2 pages

Clean Cluster Script

This document provides a bash script for cleaning up a failed Oracle Clusterware installation. It prompts the user for confirmation before proceeding to stop and remove various Oracle Clusterware services and associated files. The script includes commands to delete specific directories and files related to the installation, ensuring a complete cleanup.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
62 views2 pages

Clean Cluster Script

This document provides a bash script for cleaning up a failed Oracle Clusterware installation. It prompts the user for confirmation before proceeding to stop and remove various Oracle Clusterware services and associated files. The script includes commands to delete specific directories and files related to the installation, ensuring a complete cleanup.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Clean cluster script

In case of a failed clusterware installation, you can use below script to clear up the past actions

##############################################################################
##################################################

#!/bin/bash

echo

echo "Remove the Oracle Clusterware Service ?"

echo

echo "Enter y[yes] or n[no] to exit"read comit

if [ $comit == "n" ]; then

echo "Exit from Script without any change..."

exit 1

else

echo "Start to Shutdown and Remove Oracle Clusterware ..."

echo

/etc/init.d/[Link] stop

/etc/init.d/[Link] disable

/etc/init.d/[Link] stop

/etc/init.d/[Link] disable

/etc/init.d/[Link] stop

/etc/init.d/[Link] disable

/etc/init.d/[Link] stop

/etc/init.d/[Link] disable

rm -rf /etc/oracle /etc/[Link] 


rm -rf /etc/init.d/[Link] /etc/init.d/[Link] /etc/init.d/[Link] /etc/init.d/[Link]
rm -rf /etc/rc2.d/[Link] /etc/rc2.d/[Link] etc/rc3.d/[Link] \

/etc/rc3.d/[Link] /etc/rc4.d/[Link] /etc/rc4.d/[Link] \

/etc/rc5.d/[Link] /etc/rc5.d/[Link] /etc/rc.d/rc0.d/[Link] \

/etc/rc.d/rc1.d/[Link] /etc/rc.d/rc6.d/[Link] /etc/rc.d/rc4.d/[Link]

cp /etc/[Link] /etc/inittab

rm -rf /etc/[Link] /etc/inittab.no_crs

rm -rf /tmp/*

rm -rf /tmp/.oracle

rm -rf /usr/local/bin/dbhome /usr/local/bin/oraenv /usr/local/bin/coraenv

rm -rf /var/tmp/.oracle

rm -rf /opt/oracle/*

echo

echo "Remove on one Node the Shared Devices"

echo "rm -rf /u03/oracrs/*"

echo

fi

##############################################################################
#####################################33

You might also like