Friday, September 24, 2010

Oracle Dev Days vm tip

We passed out a few thousand of these DVDs at OpenWorld this week.  I thought I'd pass on a little tip I use to easier connect from the host to the database inside the guest.


I setup my host's port 1521 to forward into the vm to simplify the connect.  Here's the command to issue on the host in my case my mac.

Kris-Rices-MacBook-Pro:~ klrice$ VBoxManage modifyvm "Oracle Developer Days"  --natpf1 "tns,tcp,127.0.0.1,1521,,1521"


Now anything going to 1521 on the host will be forwarded into the guest.  Here's sqlplus working on the host machine.


Kris-Rices-MacBook-Pro:~ klrice$ sqlplus system/oracle
SQL*Plus: Release 10.2.0.4.0 - Production on Fri Sep 24 11:29:03 2010
Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> select 1 from dual;
  1
----------
  1