title: ORA-12505 for Oracle XE 11g on Ubuntu
body: <p>I have some problems connecting to my local Oracle database.</p>
  
  <p>I have done the installation based on this guide: <a href="http://sysadminnotebook.blogspot.no/2012/10/installing-oracle-11g-r2-express.html" rel="nofollow">installing-oracle-11g-r2-express</a></p>
  
  <p>The tutorial worked out fine, but after the installation I am unable to connect to database using SQLDeveloper or 'sqlplus system/password@XE'</p>
  
  <pre><code>sqlplus system/password@XE
  SQL*Plus: Release 11.2.0.2.0 Production on Sat Nov 16 11:57:06 2013
  Copyright (c) 1982, 2011, Oracle.  All rights reserved.
  ERROR:
  ORA-12514: TNS:listener does not currently know of service requested in connect
  descriptor
  </code></pre>
  
  <p>connecting without using XE works:</p>
  
  <pre><code>:~$ sqlplus sys as sysdba
  SQL*Plus: Release 11.2.0.2.0 Production on Sat Nov 16 11:54:54 2013
  Copyright (c) 1982, 2011, Oracle.  All rights reserved.
  Enter password: 
  Connected to:
  Oracle Database 11g Express Edition Release 11.2.0.2.0 - 64bit Production
  SQL&gt; 
  </code></pre>
  
  <p>when I try to connect using SQLDeveloper I get the following error:</p>
  
  <pre><code>ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
  </code></pre>
  
  <p><em><strong>What am I missing?</em></strong></p>
  
  <hr>
  
  <p><strong>listener.ora as requested by @Mihai:</strong>
  <em>changed 20.11.2012 12:06</em></p>
  
  <pre><code># listener.ora Network Configuration File:
  
  SID_LIST_LISTENER =
    (SID_LIST =
      (SID_DESC =
        (SID_NAME = PLSExtProc)
        (ORACLE_HOME = /u01/app/oracle/product/11.2.0/xe)
        (PROGRAM = extproc)
      )
       (SID_DESC =
         (SID_NAME = XE)
         (ORACLE_HOME = /u01/app/oracle/product/11.2.0/xe)
       )
    )
  
  LISTENER =
    (DESCRIPTION_LIST =
      (DESCRIPTION =
        (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
        (ADDRESS = (PROTOCOL = TCP)(HOST = &lt;name_of_my_computer&gt;)(PORT = 1521))
      )
    )
  
  DEFAULT_SERVICE_LISTENER = (XE)
  </code></pre>
  
  <hr>
  
  <p><strong>$ lsnrctl status as requested by @BjarteBrandt:</strong></p>
  
  <pre><code>$ lsnrctl status
  
  LSNRCTL for Linux: Version 11.2.0.2.0 - Production on 18-NOV-2013 12:52:26
  
  Copyright (c) 1991, 2011, Oracle.  All rights reserved.
  
  Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC_FOR_XE)))
  STATUS of the LISTENER
  ------------------------
  Alias                     LISTENER
  Version                   TNSLSNR for Linux: Version 11.2.0.2.0 - Production
  Start Date                18-NOV-2013 12:48:06
  Uptime                    0 days 0 hr. 4 min. 20 sec
  Trace Level               off
  Security                  ON: Local OS Authentication
  SNMP                      OFF
  Default Service           XE
  Listener Parameter File   /u01/app/oracle/product/11.2.0/xe/network/admin/listener.ora
  Listener Log File         /u01/app/oracle/diag/tnslsnr/&lt;name_of_my_computer&gt;/listener/alert/log.xml
  Listening Endpoints Summary...
    (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC_FOR_XE)))
    (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=&lt;name_of_my_computer&gt;)(PORT=1521)))
  Services Summary...
  Service "PLSExtProc" has 1 instance(s).
    Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
  The command completed successfully
  </code></pre>