1.确保主机与虚拟机间通信正常,双方关闭window防火墙。如能 ping 通,请确保两机IP在一个网段
2.主机安装orcl客户端
3.虚拟机 D:\app\lin\product\11.2.0\dbhome_1\NETWORK\ADMIN\tnsnames.ora 文件复制到
宿主机 D:\Program Files (x86)\Oracle\Instant Client\network\admin\tnsnames.ora
并将 localhost 修改为 169.254.84.184
ORCL = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 169.254.84.184)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl) ) )
4.虚拟机配置监听服务
lsnrctl status
5.虚拟机监听服务与 service 打开,成功!