RAC中的EM切换节点

来源:互联网 发布:bp神经网络 遗传算法 编辑:程序博客网 时间:2024/05/19 00:47

环境:RAC 11.2.0.4

RAC环境中,应该是不能在多个节点同时运行EM,但是可以切换运行的节点:

步骤:

1。 关闭正在运行的EM
[oracle@rac1 ~]$ emctl stop dbconsole
Oracle Enterprise Manager 11g Database Control Release 11.2.0.4.0 
Copyright (c) 1996, 2013 Oracle Corporation.  All rights reserved.
https://rac1:1158/em/console/aboutApplication
Stopping Oracle Enterprise Manager 11g Database Control ... 
...  Stopped. 

2。
[oracle@rac1 ~]$ emca -reconfig dbcontrol -cluster -EM_NODE rac1 -EM_SID_LIST orcl1,orcl2

STARTED EMCA at Nov 30, 2017 5:04:15 PM
EM Configuration Assistant, Version 11.2.0.3.0 Production
Copyright (c) 2003, 2011, Oracle.  All rights reserved.

Enter the following information:
Database unique name: orcl
Service name: orcl
Agent Node list [comma separated] (optional): rac1     <<<<<<<<这里只能填一个目标节点,不能rac1,rac2
Do you wish to continue? [yes(Y)/no(N)]: y
Nov 30, 2017 5:04:24 PM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /u02/app/oracle/cfgtoollogs/emca/orcl/emca_2017_11_30_17_04_15.log.
Nov 30, 2017 5:04:28 PM oracle.sysman.emcp.ParamsManager getInaccessibleNodeList
WARNING: The following cluster nodes are unavailable: [rac2].
Nov 30, 2017 5:04:28 PM oracle.sysman.emcp.ParamsManager getInaccessibleSidList
WARNING: The requested operation will not be performed for the following instances: [orcl2].
Nov 30, 2017 5:04:29 PM oracle.sysman.emcp.util.DBControlUtil stopOMS
INFO: Stopping Database Control (this may take a while) ...
Nov 30, 2017 5:04:54 PM oracle.sysman.emcp.EMAgentConfig performDbcReconfiguration
INFO: Propagating /u02/app/oracle/product/11.2.0/db_home/rac1_orcl/sysman/config/emd.properties to remote nodes ...
Nov 30, 2017 5:04:54 PM oracle.sysman.emcp.util.DBControlUtil startOMS
INFO: Starting Database Control (this may take a while) ...
Nov 30, 2017 5:06:05 PM oracle.sysman.emcp.EMDBPostConfig performDbcReconfiguration
INFO: Database Control started successfully
Nov 30, 2017 5:06:05 PM oracle.sysman.emcp.EMDBPostConfig showClusterDBCAgentMessage
INFO: 
****************  Current Configuration  ****************
INSTANCE            NODE          DBCONTROL_UPLOAD_HOST
----------        ----------        ---------------------

orcl              rac1              rac1


Enterprise Manager configuration completed successfully
FINISHED EMCA at Nov 30, 2017 5:06:05 PM

此时EM会自动打开