title: Oracle XE and DBeaver: ORA-12514, TNS:listener does not currently know of service requested in connect descriptor
body: <p>I need to connect  to Oracle XE 18.0.0 through DBeaver 7.0 but failed due to error <em>Listener refused the connection with the following error:
  ORA-12514, TNS:listener does not currently know of service requested in connect descriptor</em>
  The connection to Oracle with SQLPlus works without any issue.
  I`ll really appreciate any idea that will help to solve this problem.</p>
  <p>tnsnames.ora</p>
  <pre><code>XE =
        (DESCRIPTION =
          (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.Y.YY)(PORT = 1521))
          (CONNECT_DATA =
            (SERVER = DEDICATED)
            (SERVICE_NAME = XE)
          )
        )
      
      LISTENER_XE =
        (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.Y.YY)(PORT = 1521))
      
      
      ORACLR_CONNECTION_DATA =
        (DESCRIPTION =
          (ADDRESS_LIST =
            (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
          )
          (CONNECT_DATA =
            (SID = CLRExtProc)
            (PRESENTATION = RO)
          )
        ) 
  </code></pre>
  <p>listener.ora</p>
  <pre><code>DEFAULT_SERVICE_LISTENER = XE
  
  SID_LIST_LISTENER =
    (SID_LIST =
      (SID_DESC =
        (SID_NAME = CLRExtProc)
        (ORACLE_HOME = C:\app\YYY\product\18.0.0\dbhomeXE)
        (PROGRAM = extproc)
        (ENVS = &quot;EXTPROC_DLLS=ONLY:C:\app\YYY\product\18.0.0\dbhomeXE\bin\oraclr18.dll&quot;)
      )
    )
  
  LISTENER =
    (DESCRIPTION_LIST =
      (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.Y.YY)(PORT = 1521))
        (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
      )
    )
  </code></pre>
  <p>lsnrctl status</p>
  <pre><code> LSNRCTL for 64-bit Windows: Version 18.0.0.0.0 - Production on 20-JUN-2020 17:03:44
  
  Copyright (c) 1991, 2018, Oracle.  All rights reserved.
  
  Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.Y.2YY)(PORT=1521)))
  STATUS of the LISTENER
  ------------------------
  Alias                     LISTENER
  Version                   TNSLSNR for 64-bit Windows: Version 18.0.0.0.0 - Production
  Start Date                20-JUN-2020 16:09:45
  Uptime                    0 days 0 hr. 54 min. 3 sec
  Trace Level               off
  Security                  ON: Local OS Authentication
  SNMP                      OFF
  Default Service           XE
  Listener Parameter File   C:\app\YYY\product\18.0.0\dbhomeXE\network\admin\listener.ora
  Listener Log File         C:\app\YYY\product\18.0.0\diag\tnslsnr\YYYPC\listener\alert\log.xml
  Listening Endpoints Summary...
    (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.Y.YY)(PORT=1521)))
    (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1521ipc)))
  Services Summary...
  Service &quot;CLRExtProc&quot; has 1 instance(s).
    Instance &quot;CLRExtProc&quot;, status UNKNOWN, has 1 handler(s) for this service...
  The command completed successfully
  </code></pre>
  <p>global_name</p>
  <pre><code>SQL&gt; select * from global_name;
  
  GLOBAL_NAME
  --------------------------------
  XE
  </code></pre>
  <p>service_name</p>
  <pre><code>SQL&gt; select value from v$parameter where name='service_names';
  
  VALUE
  ----------------------------------------------------------------
  XE
  </code></pre>