1. 概述
Oracle EM 12c OMR数据库异常后, 需要将em 12c平台连接转换到备份的standby OMR数据库。
a. 关闭OMS
b. 开启OMR Data Guard数据库为read/write模式
c. 更新Oracle EM OMS的连接DB的配置
d. 启动OMS
这个操作方法在Oracle EM 11g/12c中都有效。
2. 具体操作步骤
(1). 关闭OMS
找到OMS所在的bin下的emctl工具,关闭OMS服务
$ cd $OMS_HOME/bin
$./emctl stop oms
(2). 将OMR Data Guard开启为可读写模式
(3). 更新Oracle EM OMS的连接DB的配置
首先检查一下DB连接配置详情。
$cd $OMS_HOME/bin
$./emctl config oms -list_repos_details
例子:
[oracle@sz101db03 bin]$ ./emctl config oms -list_repos_details
Oracle Enterprise Manager Cloud Control 12c Release 4
Copyright (c) 1996, 2014 Oracle Corporation. All rights reserved.
Repository Connect Descriptor : (DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=ft01scan.huawei.com)(PORT=1521)))(CONNECT_DATA=(SID=em12c)))
Repository Host : ft01scan.huawei.com
Repository Port : 1521
Repository SID : em12c
Repository User : SYSMAN
[oracle@sz101db03 bin]$
通过emctl工具修改EM 12c的DB配置, emctl提供了两个修改方法。
语法:
emctl config oms -store_repos_details (-repos_host
-repos_port -repos_sid | -repos_conndesc ) -repos_user [-repos_pwd ]
Note: Steps in changing repository details are:
1) Stop all the OMSs using 'emctl stop oms'
2) Run 'emctl config oms -store_repos_details' on each of the OMSs
3) Stop all the OMSs completely using 'emctl stop oms -all'
4) Start all of the OMSs using 'emctl start oms'
例子:
emctl config oms -store_repos_details -repos_conndesc"'(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=ft01scan.huawei.com)(PORT=1521)))(CONNECT_DATA=(SID=em12c)))'" -repos_user sysman -repos_pwd Huawei123
或者
emctl config oms -store_repos_details -repos_host ft01scan.huawei.com -repos_port 1521 -repos_sid em12c -repos_user SYSMAN -repos_pwd Huawei123