I am setting up Oracle in virtual box and ran into this error: TNS:Listener does not currently know of SID given in connect descriptor
.
Here are the steps I took to download oracle on virtual box:
- Downloaded VirtualBox 5.2.0.
- Got the Oracle DB Developer VM file (DeveloperDaysVM2017-06-13_01.ova).
- Opened the file inside virtual box and opened it from virtual box.
- Now when I go to Sql Developer on my Mac machine and try to connect to oracle in Virtual Box I got that error above. I included a screenshot below.
For some reason when I do: telnet 127.0.0.1 1521
it seems to work. But when I do it through Sql Developer I am getting the error in red in the pic above. Can someone give me some pointers?
My tnsnames.ora
file:
ORCL12C =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl12c)
)
)
LISTENER_ORCL12C =
(ADDRESS = (PROTOCOL = TCP)(HOST = 0.0.0.0)(PORT = 1521))
ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)
listeners.ora
file:
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = orcl12c)
(SID_NAME = orcl12c)
(ORACLE_HOME = /u01/app/oracle/product/12.2/db_1)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
(ADDRESS = (PROTOCOL = TCP)(HOST = 0.0.0.0)(PORT = 1521))
)
)
#HOSTNAME by pluggable not working rstriction or configuration error.
DEFAULT_SERVICE_LISTENER = (orcl12c)