我新装了一个oracle 11g r1 服务端,过程中有报了一个 错误如下:
安装检测到系统的主 IP 地址是 DHCP 分配的地址。
建议案: Oracle 支持在具有 DHCP 分配的 IP 地址的系统上进行安装。但在安装之前, 必须将Microsoft LoopBack Adapter 配置为系统的主网络适配器。有关在配置有 DHCP 的系统上安装软件的详细信息, 请参阅 Installation Guide。我在网上搜了下,都说要安装一个 Microsoft Loopback Adapter 设备,然后设定固定的IP地址,设成 192.168.0.1。
我是这么做的,但是仍然出现以上警告。就没管它 了。
安装完成后,一切正常,tnsnames.ora如下:
ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 172.16.54.164)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)
listener.ora 如下:
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = 172.16.54.164)(PORT = 1521))
)
)
为什么我把两个文件的IP地址改成 127.0.0.1 就不行了呢? 我 tnsping oracl 就会报
TNS-12541: TNS: 无监听程序 这个错误。
因为我的IP地址是自动获取的,所以不能用 172.16.54.164 这个地址,我要改成什么样子才行呢?
------解决方案--------------------
tnsnames.ora
改为这样
ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST =127.0.0.1)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)
EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
)
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
)
)
listener.ora
改为:
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = D:\oracle\product\10.2.0\db_1)
(PROGRAM = extproc)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
(ADDRESS = (PROTOCOL = TCP)(HOST =127.0.0.1)(PORT = 1521))
)
)