当前位置:Gxlcms > 数据库问题 > 关闭并卸载数据库脚本

关闭并卸载数据库脚本

时间:2021-07-01 10:21:17 帮助过:36人阅读

echo -e "shutdown immdiate;\nexit">/tmp/shutdown.sql su - oracle -c "sqlplus / as sysdba@/tmp/shutdown.sql" if [ $? -eq 0 ] then echo "shutdown oracle successful!" rm -rf /tmp/shutdown.sql fi read -p "Are you sure to unistall the Oracle and reboot the system?(Please enter ‘y‘ or ‘n‘):" flag if [ "$flag"=="y" -o "$flag"=="Y" ] then rm -rf /opt/oracle rm -rf /etc/ora* rm -rf /user/local/bin/*oraenv rm -rf /tmp/*Oracle* rm -rf /tmp/Oracle* userdel oracle rm -rf /home/oracle groupdel dba droupdel oinstall sync sync sync shutdown -r -t time now else echo "Cancel unistall the Oracle ..." exit 0 fi

 

关闭并卸载数据库脚本

标签:bin   and   oca   .sql   blog   post   syn   关闭   数据   

人气教程排行