Can't access oracle database from guest

Discussions about using Windows guests in VirtualBox.
Post Reply
toouur
Posts: 1
Joined: 17. Jun 2017, 14:45

Can't access oracle database from guest

Post by toouur »

Hi all,

I have the following issue with virtual box.

1. I can't access my oracle database (guest win7) in SQL developer (host win 10) when guest is in NAT. Even with the help of port forwarding (I could do the same in vmware)

I wrote something like my 192.168.1.53:2222 ===> 1521 (which in my opinion should forward my external request to localhost of guest port 1521)

Well, I managed to find workaround, made second host-only network but

1. I can now access my oracle database (guest win7) in SQL developer (host win 10)
2. I can't access vice versa (oracle database (host win 10) in SQL developer (guest win7)

Even if I can ping my host from guest.

Any suggestions?

My host ip is 192.169.1.53
VB host-only is 192.168.56.1
1521 is open in firewall.

In SQL developer I write 192.168.56.1:1521
okiuss
Posts: 61
Joined: 7. Nov 2016, 14:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: OSX,LINUX,WINXXX
Location: Austria

Re: Can't access oracle database from guest

Post by okiuss »

Some oracle versions on specific platforms (Windows) use a dynamic port after the initial connect.
You have to tell the oracle db server to 'stay' on port 1521.
If i remember correctly this can be done with the environment variable "USE_SHARED_SOCKET".
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Can't access oracle database from guest

Post by scottgus1 »

I'm not certain what the deal is with your NAT problem. I have never run an Oracle database.

But be sure that you understand Host-Only. Host-only is an independent network channel, not connected to your host OS's physical network. When your guest is on Host-Only, you will not be able to use your host's physical IP address to communicate between guest and host. The host's Host-Only IP address is 192.168.56.1, as you know. The guest's IP address will be 192.168.56.something - look in the guest OS to find out what "something" is. In your guest you contact the host via 192.168.56.1. In the host you contact the guest via 192.168.56.something.

If I read correctly that your SQL Developer program is on your host and the database itself is in the guest, then "In SQL developer I write 192.168.56.1:1521" means you are asking the host OS to respond with the database info, which it can't do because the database isn't running in the host OS. I think you would need to try "192.168.56.something:1521".
Post Reply