Oracle常用脚本——卸载Grid Control
Oracle常用脚本——卸载Grid Control
[plain] #!/bin/bash # 0. stop some service su - oracle -c "\$AGENT_HOME/bin/emctl stop agent" su - oracle -c "\$OMS_HOME/bin/emctl stop oms" # 1. delete user oracle's content echo "" echo "delete user oracle's content" rm -rf /u01/app/oraInventory rm -rf /u01/app/oracle/* rm -rf /tmp/* # 2. delete user root's content echo "" echo "delete user root's content" rm -f /etc/oratab rm -fr /etc/ora* rm -f /usr/local/bin/coraenv rm -f /usr/local/bin/dbhome rm -f /usr/local/bin/oraenv # 3. reboot # reboot
当然AGENT_HOME与OMS_HOME两个环境变量要有.