Oracle EM 12c 如何切換備用的OMR資料庫 - 1

tolywang發表於2015-11-06
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 <host> -repos_port <port> -repos_sid <sid> | -repos_conndesc <connect descriptor>) -repos_user <username> [-repos_pwd <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 


來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/35489/viewspace-1824329/,如需轉載,請註明出處,否則將追究法律責任。

相關文章