This content has been marked as final. Show 1 reply
I cannot speak to any Toad issues (that would be a different forum, of course), but the way SQL Developer connects to an Oracle database running in a VM goes as follows for the VM running under Oracle VirtualBox:
Case A - you want to use localhost in the SQL Developer connection definition
1. In the VM guest's network settings, for Attach To select the NAT type.
2. Next, click the Port Forwarding button and define a rule
3. Type in a name for the rule, use tcp for the protocol, then map the db's port on the VM (say, guest port 1521) to an unused port on the host (say, host port 1522).
4. Finally, create the SQL Developer connection as a basic type with host=localhost, port=1522, plus the sid or service for the database on the VM
Case B - you want to use the VM's ip address in the SQL Developer connection definition
1. In the VM guests network settings, for Attach To select the Bridged Adapter type.
2. Next, for the Promiscuous Mode setting, select Allow Any
3. Find the ip address of the VM
4. Finally, create the SQL Developer connection as a basic type with host=<vm-ip-address>, port=1521, plus the sid or service for the database on the VM
Most users prefer Case A. With Case B, if you save the state of the VM then connect your pc / laptop to a different network, the ip address will change and you must update the SQL Developer connection definition. Perhaps these scenarios will be similar for your environment with Toad and whatever VM product you use.