title: Oracle virtual box: TNS:Listener does not currently know of SID given in connect descriptor
body: <p>I am setting up Oracle in virtual box and ran into this error: <code>TNS:Listener does not currently know of SID given in connect descriptor</code>.</p>
  
  <p>Here are the steps I took to download oracle on virtual box:</p>
  
  <ol>
  <li>Downloaded VirtualBox 5.2.0.</li>
  <li>Got the Oracle DB Developer VM file (DeveloperDaysVM2017-06-13_01.ova).</li>
  <li>Opened the file inside virtual box and opened it from virtual box.</li>
  <li>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.</li>
  </ol>
  
  <p><a href="https://i.stack.imgur.com/RAlrF.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/RAlrF.png" alt="enter image description here"></a></p>
  
  <p>For some reason when I do: <code>telnet 127.0.0.1 1521</code> 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?</p>
  
  <p>My <code>tnsnames.ora</code> file:</p>
  
  <pre><code>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)
      )
    )
  </code></pre>
  
  <p><code>listeners.ora</code> file:</p>
  
  <pre><code>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)
  </code></pre>