Renny was stuck with some Oracle Stored Procedure issue and she wanted to get Oracle 10g running on my laptop. And I had 0 time to get it going. There have not been any Mac releases of Oracle Database lately. So I am momentarily stuffed.
My options were to get VMWare Fusion, Q.app (qemu for Mac) or VirtualBox. Last time I tried VirtualBox I was getting error when I startup the guest OS. But thought will it a try ...
There comes VirtualBox to wrap Ubuntu Gutsy Gibbon, Oracle XE 10g. All took about 30 minutes to get started, incl. downloads. I preferred to run only the database from within the guest OS and run Eclipse, SQL Developer etc from Host OS which is Mac OS X in this case. Now the stumble was with the networking in VirtualBox which by default is NAT/NAPT. So no IP Address assigned to host OS so that I can make a TCP connection from host to guest (whereas vice-versa works fine).
Bit of a Googling and the VirtualBox User Manual introduces me to VBoxManage using which you can add port forwarding to guest OS settings whereby a port connection on host is forwarded to mapped port on guest. So using following commands I was able to set this up for TNS listener and worked like a charm when tested with SQL Developer running on host.
VBoxManage setextradata "Ubuntu 7.10" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/tns/Protocol" TCP
VBoxManage setextradata "Ubuntu 7.10" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/tns/GuestPort" 1521
VBoxManage setextradata "Ubuntu 7.10" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/tns/HostPort" 1521
All is good that ends good .. And they lived happily ever after !!