星期二, 7月 29, 2014

Using EMCA When Database Host Name or IP Address Changes

Using EMCA When Database Host Name or IP Address Changes

----------------------------------------------------------------------
適用在有redhat cluster, HP ServiceGuard, Veritas VCS 等等active-standby 的資料庫環境, 因只需要提供一個vip 提供client連入, 所以預設裝好資料庫時, enterprise manager 會預設使用host ip,

When the database host name (including the domain name) or the IP address changes, deconfigure and then reconfigure the Database Console with the repository create command. Run the following command:

Nov 10, 2010 6:24:04 PM oracle.sysman.emcp.util.PlatformInterface executeCommand
WARNING: Error executing /oracle/db102/sysman/admin/emdrep/bin/RepManager -conne
ct (DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=db1)(PORT=1521)))(CON
NECT_DATA=(SERVICE_NAME=orcl))) -repos_user SYSMAN -action drop -verbose -output
_file /oracle/db102/cfgtoollogs/emca/orcl/emca_repos_drop_2010-11-10_06-24-03-PM
.log
---
改執行以下 或修改 /oracle/db102/db1_orcl/sysman/config/emoms.properties
/oracle/db102/sysman/admin/emdrep/bin/RepManager -connect "(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=10.1.81.8)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=orcl)))" -repos_user SYSMAN -action drop -verbose

.
.
Dropped Repository Successfully.

----------------------------------------------
export ORACLE_HOSTNAME=db-vip
emca -config dbcontrol db -repos create

You have specified the following settings

Database ORACLE_HOME ................ /oracle/db102

Database hostname ................ db-vip
Listener port number ................ 1521
Database SID ................ orcl
Email address for notifications ...............
Outgoing Mail (SMTP) server for notifications ...............

--
切換到另一個node,也建立db console
export ORACLE_HOSTNAME=db-vip
emca -config dbcontrol db

#把node2 port修正
emca -reconfig ports -DBCONTROL_HTTP_PORT 5500

如果登入OEM 發生錯誤
alter session set current_schema = SYSMAN;
exec mgmt_target.set_agent_tzrgn('db-vip:3938','+08:00')

emctl stop agent
emctl resetTZ agent
emctl start agent
emctl stop dbconsole
emctl start dbconsole
----------------------------------------------------------------------

沒有留言:

LinkWithin-相關文件

Related Posts Plugin for WordPress, Blogger...