Reputation: 69
I need to connect to Oracle XE 18.0.0 through DBeaver 7.0 but failed due to error Listener refused the connection with the following error: ORA-12514, TNS:listener does not currently know of service requested in connect descriptor The connection to Oracle with SQLPlus works without any issue. I`ll really appreciate any idea that will help to solve this problem.
tnsnames.ora
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)
)
)
listener.ora
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 = "EXTPROC_DLLS=ONLY:C:\app\YYY\product\18.0.0\dbhomeXE\bin\oraclr18.dll")
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.Y.YY)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
)
lsnrctl status
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 "CLRExtProc" has 1 instance(s).
Instance "CLRExtProc", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
global_name
SQL> select * from global_name;
GLOBAL_NAME
--------------------------------
XE
service_name
SQL> select value from v$parameter where name='service_names';
VALUE
----------------------------------------------------------------
XE
Upvotes: 1
Views: 14763
Reputation: 1
For me selecting SID instead of Service Name, and in Database I wrote xe, and it worked.
Upvotes: 0
Reputation: 109
I don't know at a very high level but if you are working with your local database, you can try restarting your computer. It will resolve the issue.
These references might be useful.
Upvotes: 0
Reputation: 1483
My issue was having selected "Service name" instead of "SID", switching to SID solved the issue. (I was specifying a database name in the connection)
Upvotes: 1
Reputation: 90
I fixed my problem by connecting with system instead of sys. So
conn system/[password]@localhost:1521 as sysdba;
Upvotes: 0