win7+oracle11,vmbox中winxp连接

  • 重启TNSLSNR 
    打开CMD,输入以下命令。

lsnrctl stop

lsnrctl start

lsnrctl stat

///////////////////////////////////////////////////

# listener.ora Network Configuration File: F:appAdministratorproduct11.2.0dbhome_1 etworkadminlistener.ora

# Generated by Oracle configuration tools.

SID_LIST_LISTENER =

  (SID_LIST =

    (SID_DESC =

      (SID_NAME = CLRExtProc)

      (ORACLE_HOME = F:appAdministratorproduct11.2.0dbhome_1)

      (PROGRAM = extproc)

      (ENVS = "EXTPROC_DLLS=ONLY:F:appAdministratorproduct11.2.0dbhome_1inoraclr11.dll")

    )

  )

LISTENER =

  (DESCRIPTION_LIST =

    (DESCRIPTION =

      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))

      (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))// localhost改为计算机名:方法:点我的电脑右击,属性中的“计算机名”

    )

  )

ADR_BASE_LISTENER = F:appAdministrator

//////////////////////////////////////////

改vmbox中winxp网络 为host-only 模式,网址选自动获取

Tnsnames.ora 中的host 也改为改为oracle 所在主机的计算机名:方法:点我的电脑右击,属性中的“计算机名”

/////////////////////////////////////////////////////////////////////////////////////

在此之前,先关闭宿主机的防火墙,否则PING不通宿主机。

见:https://blog.csdn.net/dkfajsldfsdfsd/article/details/79441874

原文地址:https://www.cnblogs.com/hssbsw/p/10970828.html