主页 > 知识库 > 数据库 > Oracle >

Oracle常用脚本——卸载Grid Control

来源:中国IT实验室 作者:佚名 发表于:2013-07-12 12:13  点击:
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.
 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两个环境变量要有.

    有帮助
    (0)
    0%
    没帮助
    (0)
    0%