oracle 配置傳統的雙機ha時需要修改的相關檔案

msdnchina發表於2011-09-18

假設如下的環境
1號機主機名為hosta,物理ip地址為192.168.0.1
2號機主機名為hostb,物理ip地址為192.168.0.2
active ip(ha軟體虛擬出來的ip) 地址為192.168.0.10

1. /etc/hosts檔案中,可以有127.0.0.1這一行,但是127.0.0.1之後,不能有主機名。可以是127.0.0.1 localhost 等等

2.1號主機的/etc/hosts檔案,應該有如下的行:
192.168.0.1 hosta
192.168.0.2 hostb
192.168.0.10 cluster

3.2號主機的/etc/hosts檔案,應該有如下的行:
192.168.0.1 hosta
192.168.0.2 hostb
192.168.0.10 cluster

4.1號主機中oracle_home/network/admin下的listener.ora檔案配置:

SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = F:appAdministratorproduct11.1.0db_1)
(PROGRAM = extproc)
)
(SID_DESC =
(GLOBAL_NAME = ora11g)
(ORACLE_HOME = F:appAdministratorproduct11.1.0db_1)
(SID_NAME = ora11g)
)
)

LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = cluster)(PORT = 1521))
)
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
)

注意:以上HOST = cluster 可以換成HOST = 192.168.0.10

5.2號主機中oracle_home/network/admin下的listener.ora檔案配置:

SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = F:appAdministratorproduct11.1.0db_1)
(PROGRAM = extproc)
)
(SID_DESC =
(GLOBAL_NAME = ora11g)
(ORACLE_HOME = F:appAdministratorproduct11.1.0db_1)
(SID_NAME = ora11g)
)
)

LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = cluster)(PORT = 1521))
)
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
)


注意:以上HOST = cluster 可以換成HOST = 192.168.0.10

[@more@]

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

相關文章