7×24小时服务热线 171 9866 1244
栏目列表
推荐内容

Oracle常用脚本——卸载Grid Control

时间:2013-07-12 12:13来源:中国IT实验室 作者:佚名 点击:
Oracle常用脚本卸载Grid Control 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 [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 #
 Oracle常用脚本——卸载Grid Control
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
[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两个环境变量要有.

(责任编辑:admin)
顶一下
(0)
0%
踩一下
(0)
0%
------分隔线----------------------------
关闭
171 9866 1244 工作日:9:00-18:00
点击这里给我发消息

邮箱:
abit@design.com