ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 10g grid control,agent端重建targets.xml文件的方法

10g grid control,agent端重建targets.xml文件的方法

原创 Linux操作系统 作者:okayleo 时间:2011-07-13 13:42:51 0 删除 编辑

卸载重装了gc的oms软件后,重新配置Agent端时,不小心将${AGENT_HOME}/sysman/emd/targets.xml删除掉。
在清理了agent的信息后,重新启动agent时报错,如下:

[oracle@testdb1 ~]$${AGENT_HOME}/bin/emctl start agent
Oracle Enterprise Manager 10g Release 10.2.0.1.0.
Copyright (c) 1996, 2005 Oracle Corporation.  All rights reserved.
Starting agent .......... failed.
Failed to initialize the Target Manager.
Consult the log files in: /u01/app/oracle/agent/agent10g/sysman/log


metalink提供了重建targets.xml的方法,具体操作如下:
1、手工编辑文件targets.xml,添加下面内容

[oracle@testdb1 ~]$vi ${AGENT_HOME}/sysman/emd/targets.xml

           
             
 


其中内容参考$ORACLE_HOME/sysman/config/emd.properties:

...
agentSeed=12345678
...
EMD_URL=http://agentmachine.domain:9876/emd/main
...


2.执行agentca -d重新获取target信息

[oracle@testdb1 ~]${AGENT_HOME}/bin/agentca -d

Stopping the agent using /u01/app/oracle/agent/agent10g/bin/emctl  stop agent
Oracle Enterprise Manager 10g Release 10.2.0.1.0.
Copyright (c) 1996, 2005 Oracle Corporation.  All rights reserved.
Agent is Not Running
Running agentca using /u01/app/oracle/agent/agent10g/oui/bin/runConfig.sh ORACLE_HOME=/u01/app/oracle/agent/agent10g ACTION=Configure MODE=Perform. RESPONSE_FILE=/u01/app/oracle/agent/agent10g/response_file RERUN=TRUE INV_PTR_LOC=/u01/app/oracle/agent/agent10g/oraInst.loc COMPONENT_XML={oracle.sysman.top.agent.10_2_0_1_0.xml}
Perform. - mode is starting for action: Configure


Perform. - mode finished for action: Configure

You can see the log file: /u01/app/oracle/agent/agent10g/cfgtoollogs/oui/configActions2011-07-11_01-27-56-PM.log


3.启动agent,此时能正常启动

[oracle@testdb1 ~]${AGENT_HOME}/bin/emctl start agent
Oracle Enterprise Manager 10g Release 10.2.0.1.0.
Copyright (c) 1996, 2005 Oracle Corporation.  All rights reserved.
Starting agent ........ started.


4.查看agent状态

[oracle@testdb1 ~]${AGENT_HOME}/bin/emctl status agent
Oracle Enterprise Manager 10g Release 10.2.0.1.0.
Copyright (c) 1996, 2005 Oracle Corporation.  All rights reserved.
---------------------------------------------------------------
Agent Version     : 10.2.0.1.0
OMS Version       : 10.2.0.1.0
Protocol Version  : 10.2.0.0.0
Agent Home        : /u01/app/oracle/agent/agent10g
Agent binaries    : /u01/app/oracle/agent/agent10g
Agent Process ID  : 16061
Parent Process ID : 16046
Agent URL         : https://testdb1.localdomain:3872/emd/main/
Repository URL    : https://testdb2.localdomain:1159/em/upload
Started at        : 2011-07-11 13:31:16
Started by user   : oracle
Last Reload       : 2011-07-11 13:31:16
Last successful upload                       : (none)
Last attempted upload                        : (none)
Total Megabytes of XML files uploaded so far :     0.00
Number of XML files pending upload           :        4
Size of XML files pending upload(MB)         :     0.50
Available disk space on upload filesystem    :    72.21%
Last successful heartbeat to OMS             : 2011-07-11 13:31:23
---------------------------------------------------------------
Agent is Running and Ready


5.使用emctl的upload选项将Agent上传到OMS

[oracle@testdb1 ~]${AGENT_HOME}/bin/emctl upload
Oracle Enterprise Manager 10g Release 10.2.0.1.0.
Copyright (c) 1996, 2005 Oracle Corporation.  All rights reserved.
---------------------------------------------------------------
EMD upload completed successfully

PS:
Recreate the targets.xml file with the steps in:

Note 303105.1: Grid Control Target Maintenance: How To Recreate the Targets.xml File in Grid Control 10.1.x
Note 365252.1: Grid Control Target Maintenance: How To Recreate the Targets.xml File in Grid Control 10.2.x Using 'agentca' Commands

 

 

 

 

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/12355989/viewspace-702090/,如需转载,请注明出处,否则将追究法律责任。

上一篇: 没有了~
请登录后发表评论 登录
全部评论

注册时间:2011-06-07

  • 博文量
    29
  • 访问量
    113115