I have oracle server (standard edition) installed on a guest VM (Windows 8 Hyper V). I have mapped a host entry to the VM as "brettvm". I am able to log into the VM and connect to the default instance using sqlplus. So far so good.
EDIT: Here's the listner.ora file on the server. I'm starting to suspect the trouble may lie here:
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
)
)
ADR_BASE_LISTENER = c:\oracle
The tnsnames.ora file on the server looks like this:
LISTENER_ORCL =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)
The Problem:
When I attempt to connect from the HOST machine, sqlplus prompts for a password and then hangs. Here is my tnsnames.ora on the host machine:
orcl.brettvm =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = brettvm)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)
Some things I have tried:
- Verifed that "brettvm" is in my hosts (pingable and browseable)
- Verified connectivity between the host and VM over port 80 (browser / telnet)
- Verified connectivity between the host and vm over port 1521 (telnet). Note that I opened this port up on the VM through windows firewall.
- Verified the database is up and running via sqlplus on the host (see above).
- Turned off windows firewall on the VM
I'm going to start digging through the installation guide…
Any other advice? Thanks.
Best Answer
Ultimately, this came down to a networking issue -- configuring the guest VM's network adapter (internal switch) with a static IP (this was the hard part), assigning a hosts file entry for that IP in both the Host and the Guest machines and then altering both tnsnames.ora files (host and guest) and listner.ora (guest) to use the mapped host name.
Then everything just worked.
I've pasted my internal switch config for both the host and guest and the listener and tnsnames.ora files below.
STEPS TO CONFIGURE THE GUEST VM / HOST:
Assuming that you've already created a guest VM, with a Windows Server OS, here are the networking steps...
4 . And here's how I configured the guest VM:
5 . I added hosts file aliases for the guest VM on both the host and the guest:
6 . Here's the listner.ora on the guest vm (database server):
7 . Here's the tnsnames.ora on the guest VM:
8 . Finally, here's the tnsnames on the client (host machine):
Bon appetit!
--Brett