如果GC的OMS使用过程中出现极端问题,或者打算将OMS迁移到其他服务器上,我们就需要考虑重新部署OMS。
现将这个操作过程记录一下,供参考(此方法不需要删除被监控数据库服务器上的Agent软件,但Agent需要单独配置)。
1.停止AGENT和OMS服务
1)停止repository database所在服务器的agent
[oracle@ocmdb1 bin]$ $AGENT_HOME/bin/emctl stop agent
Oracle Enterprise Manager 10g Release 10.2.0.1.0.
Copyright (c) 1996, 2005 Oracle Corporation. All rights reserved.
Stopping agent ... stopped.
2)停止GC OMS服务器上的agent和oms
[oracle@ocmdb2 ~]$ $AGENT_HOME/bin/emctl stop agent
Oracle Enterprise Manager 10g Release 10.2.0.1.0.
Copyright (c) 1996, 2005 Oracle Corporation. All rights reserved.
Stopping agent ... stopped.
[oracle@ocmdb2 ~]$ $OMS_HOME/bin/emctl stop oms -all
Oracle Enterprise Manager 10g Release 10.2.0.1.0
Copyright (c) 1996, 2005 Oracle Corporation. All rights reserved.
Oracle Management Server is Down.
2.删除GC OMS所在主机中所有与GC相关的内容
1)需要在oracle用户下删除的内容
su - oracle
rm -rf /u01/app/oraInventory
rm -rf /u01/app/oracle/*
rm -rf /tmp/*
2)需要在root下删除的内容
su - root
rm -f /etc/oratab
rm -f /usr/local/bin/*
3)重新启动操作系统
reboot
3.GC repository database中需要完成的删除动作
1)删除SYSMAN和MGMT_VIEW用户
此步骤是为了防止在OMS配置过程中因数据库对象存在导致报错。
SQL> drop user SYSMAN cascade;
User dropped.
SQL> drop user MGMT_VIEW cascade;
User dropped.
2)删除表空间
[oracle@ocmdb1 ~]$ export ORACLE_SID=ocmgc
[oracle@ocmdb1 ~]$ sqlplus / as sysdba
SQL> select tablespace_name from dba_tablespaces where tablespace_name like 'MGMT%';
TABLESPACE_NAME
------------------------------
MGMT_ECM_DEPOT_TS
MGMT_TABLESPACE
SQL> drop tablespace MGMT_ECM_DEPOT_TS including contents and datafiles;
Tablespace dropped.
SQL> drop tablespace MGMT_TABLESPACE including contents and datafiles;
Tablespace dropped.
4.重新安装GC的OMS
请参考《【GC】OEL4.8部署安装 Grid Control OMS》(http://space.itpub.net/519536/viewspace-667751)重新进行安装。
5.小结
按照这个过程我们便完成了GC OMS的重新安装。但是,注意此时GC OMS还不能够正常的监控到原Agent的信息,需要做对原Agent做进一步的调整。关于配置Agent应对OMS服务器变化的调整下回分解。
Good luck.
secooler
10.07.11
-- The End --