Is your copy of sqldeveloper also running inside the VM, or from the host OS ?
In the 1st case, I suppose connecting to localhost:1521 should work (with the proper SID).
In the 2nd case, what hostname or IP address can you use to successfully ping the VM from the host ?
Note i have never used the OVM myself, so just guessing.
what error comes up for sqldeveloper?
Do you have the same tnsnames.or and ...
sqlplus and sqldeveloper not in the sme Oracle home, I think.
I am new to all of this and I am trying to use sql developer but I am not able to set up a connection. I am wondering if it is a problem with the hostname. my hostname is ol6-121.localdomain and not localhost. Why am I able to log in with sql plus but not sql developer? I am using the oracle VM virtualBox. I am using the practice hr schema.
You provide almost no useful information.
The first thing we need is the actual error message.
Second would be a screen shot of your SQL Dev connection properties.
Since you mention that your database is running on a VBox machine, it might be helpful if you describe your net set on that machine. log on to it as root and capture the ouput of the 'ifconfig' command and show us that. The vm needs to have at least one net adapter as either bridged or host-only, and set with a fixed IP address.
If it's out vbox appliance you can use localhost and orcl for the server and service. We create a port fwd on 1521 so you can talk to the local port and it goes to 1521 on the Linux vm.
Here are images of my errors. this is what I get when I try to use sql developer with localhost. The error says invalid SID but I checked from the command line to make sure that is the SID
here I logged in with the same credentials that I tried in sqldeveloper
here is the listener. it has ol6-121.localdomain as the hostname so I tried that in sqldeveloper
but then I get this error when I try using that hostname I get this error
yes it is running in the vm. I thought it would work fine but wont work on sqldeveloper.
I attaches some images of the listener and th errors
The error says invalid SID but I checked from the command line to make sure that is the SID
No - that is NOT correct.
With 12c you need to use SERVICE_NAME and not SID.
Post full details of the version of your DB as well as the architecture: multi-tenant with root/CDB and PDBs or not.
Again, if this is our image, you need to use the service, not the SID.
Your sqlplus example (that does connect) is not going through the listener. It is a local BEQ connection.
Again, since we are dealing with a VBox vm, we need to know the details of the network adapters defined. How many adapters do you have? Are they NAT? Host-only? Bridged?
On the VM, connected as root, show us the output of
On the vm, connected as oracle, show us the FULL COMPLETE (not some cropped-off screen shot) output of
Figured out the problem had to change the MAC address to 080027F5C0DA in the network setting in the VirtualBox.
Thanks for your help everyone!
Perhaps It would be useful to others with a similar problem if you explained why that was necessary. For example, a very old VirtualBox trouble ticket (https://www.virtualbox.org/ticket/5149) now marked as obsolete gives a few reasons...
After I upgraded VirtualBox (running on WinXP Host) from 3.0.6 r52128 to 3.0.8 r53138, I found that the network bridge I create (between "VirtualBox Host-Only Network" and my real Broadcom 440x 10-100 Integrated Controller) has a different MAC address (note: this is the network bridge MAC address I am talking about here). This causes a number of problems:
- I have iTunes (on WinXP) with a number of programs I bought, and they seem to count the number of different MAC addresses that I am using when I sync with my iPhone. Hence I ran into problems after upgrading VirtualBox 5 times!
- I have MAC address based filtering at the external firewall which would then need to change
- I have DHCP Server with fixed IP mapping to MAC address, and this also needs to change.
Is yours in there or something different?