宿主机(win7-64Bit)客户端连接虚拟机(win7-32Bit)orac11gR2l小记

简单做个记录,以备下次查阅。

宿主机:win7 64Bit , 已安装oracleR2 client ,PL/SQLDeveloper

虚拟机:win7-32Bit ,已安装oracleR2 Server

刚刚开始连不上,总是提示

ora-12170:TNS:tns timeout

经过折磨,如下解决

配置网路

宿主机:

无线网卡wKiom1LX6i3jGVPvAAK0wszoyqM479.jpg

虚拟机:

桥接到host机无线网卡上

wKioL1LX6o2CsdY0AAIhPURC1n8229.jpg

互相ping一下,保证能通信。

然后把oracle服务器的E:\oracle\lynch\product\11.2.0\dbhome_1\NETWORK\ADMIN\tnsnames.ora 拷贝到宿主机的oracle客户端安装目录下面的位置D:\oracle11g\lee\product\11.2.0\client_1\network\admin

tnsnames.ora文件内容如下

# tnsnames.ora Network Configuration File: E:\oracle\lynch\product\11.2.0\dbhome_1\network\admin\tnsnames.ora
# Generated by Oracle configuration tools.
LISTENER_ORCL =
  (ADDRESS = (PROTOCOL = TCP)(HOST = 172.168.1.220)(PORT = 1521))
ORACLR_CONNECTION_DATA =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
    )
    (CONNECT_DATA =
      (SID = CLRExtProc)
      (PRESENTATION = RO)
    )
  )
ORCL =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 172.168.1.220)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = orcl)
    )
  )

如果服务没启动,报如下错误

ora-12541:TNS:no listener

启动服务后,ok,可以连接了。


你可能感兴趣的:(NetWork,无线网卡)