I am having trouble getting SQL developer running as system.
C:\Users\me>lsnrctl start
LSNRCTL for 64-bit Windows: Version 18.0.0.0.0 - Production on 21-JAN-2021 18:54:20
Copyright (c) 1991, 2018, Oracle. All rights reserved.
Starting tnslsnr: please wait...
TNS-12560: TNS:protocol adapter error
TNS-00530: Protocol adapter error
I tried to start it cause the status show it not running
C:\Users\me>lsnrctl status
LSNRCTL for 64-bit Windows: Version 18.0.0.0.0 - Production on 21-JAN-2021 19:06:29
Copyright (c) 1991, 2018, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=computerName)(PORT=1521)))
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
TNS-00511: No listener
64-bit Windows Error: 61: Unknown error
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)
(KEY=EXTPROC1522)))
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
TNS-00511: No listener
64-bit Windows Error: 2: No such file or directory
My tnsnames.ora and listener.ora are in C:\dbhomeXE\network\admin
listener.ora is
DEFAULT_SERVICE_LISTENER = XE
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = CLRExtProc)
(ORACLE_HOME = C:\Oracle\dbhomeXE)
(PROGRAM = extproc)
(ENVS = "EXTPROC_DLLS=ONLY:C:\Oracle\dbhomeXE\bin\oraclr18.dll")
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = computername)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1522))
)
)
Then my tnsnames.ora is
XE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = computername)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = XE)
)
)
LISTENER_XE =
(ADDRESS = (PROTOCOL = TCP)(HOST = computername)(PORT = 1521))
ORACLR_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1522))
)
(CONNECT_DATA =
(SID = CLRExtProc)
(PRESENTATION = RO)
)
)
I am also running the command prompt as admin. Can anyone help me understand what is happening?
Related
I just installed the Oracle 18c XE Dadtabase and created a PDB (XEPDB1) inside the CDB. I then created a new schema inside the PDF and I can connect to that schema successfully using the Service Name (SQL Developer).
But my legacy application requires a SID connection, which seems to be allowed using the USE_SID_AS_SERVICE_XE = on line in listener.ora. I also added the SID_DESC to the SID_LIST, but I still get the error:
TNS:listener does not currently know of SID given in connect descriptor
This is my listener.ora:
DEFAULT_SERVICE_LISTENER = XE
USE_SID_AS_SERVICE_XE = on
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = CLRExtProc)
(ORACLE_HOME = C:\app\michael\product\18.0.0\dbhomeXE)
(PROGRAM = extproc)
(ENVS = "EXTPROC_DLLS=ONLY:C:\app\michael\product\18.0.0\dbhomeXE\bin\oraclr18.dll")
)
(SID_DESC =
(GLOBAL_DBNAME = XE
(ORACLE_HOME = C:\app\michael\product\18.0.0\dbhomeXE)
(SID_NAME = XEPDB1
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = persik.ddns.vmware.com)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
)
And this is the tnsnames.ora:
XE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = XE)
)
)
XEPDB1 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = XEPDB1)
)
)
LISTENER_XE =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
ORACLR_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
(CONNECT_DATA =
(SID = CLRExtProc)
(PRESENTATION = RO)
)
)
It is supposed to be USE_SID_AS_SERVICE_LISTENER_NAME refer section 7.4.19 in your case listener name is LISTENER
i.e USE_SID_AS_SERVICE_LISTENER
Test case with Java code and 18xe docker container.
Commented out line in listener.ora and running java code
[oracle#240946cde855 admin]$ cat listener.ora | grep on
# listener.ora Network Configuration File:
#USE_SID_AS_SERVICE_LISTENER=on
$grep "1521" Conn.java
Connection conn = DriverManager.getConnection("jdbc:oracle:thin:#192.168.99.128:1521:xepdb1", "hr", "hr");
$ java -cp "ojdbc8.jar" Conn
Exception in thread "main" java.sql.SQLException: Listener refused the connection with the following error:
ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
Uncommenting and bouncing listener
[oracle#240946cde855 admin]$ sed -i 's|#USE|USE|g' listener.ora
[oracle#240946cde855 admin]$ cat listener.ora | grep on
# listener.ora Network Configuration File:
USE_SID_AS_SERVICE_LISTENER=on
[oracle#240946cde855 admin]$ lsnrctl reload
LSNRCTL for Linux: Version 18.0.0.0.0 - Production on 22-JUL-2020 10:39:52
Copyright (c) 1991, 2018, Oracle. All rights reserved.
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
The command completed successfully
$ java -cp "ojdbc8.jar" Conn
Oracle Database 18c Express Edition Release 18.0.0.0.0 - Production
Hi I Have been trying to solve this error with happens 3 days ago. I try everything with is on internet, and I still getting the same error.
If you can help me with this, due to I'm quite new on this, I thanks you a lot:
The file tnsnames.ora is this:
LISTENER_XE =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
XE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = XE)
)
)
EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
)
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
)
)
ORACLR_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
)
(CONNECT_DATA =
(SID = CLRExtProc)
(PRESENTATION = RO)
)
)
The Listener.ora is this:
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = C:\oraclexe\app\oracle\product\11.2.0\server)
(PROGRAM = extproc)
)
(SID_DESC =
(SID_NAME = CLRExtProc)
(ORACLE_HOME = C:\oraclexe\app\oracle\product\11.2.0\server)
(PROGRAM = extproc)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
)
(SID_DESC =
(SID_NAME = XE)
(ORACLE_HOME = C:\oraclexe\app\oracle\product\11.2.0\server)
)
)
)
DEFAULT_SERVICE_LISTENER = (XE)
And the lsnrctl status is this:
C:\WINDOWS\system32>lsnrctl status
LSNRCTL for 64-bit Windows: Version 11.2.0.2.0 - Production on 20-ABR-2020 20:16:51
Copyright (c) 1991, 2014, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for 64-bit Windows: Version 11.2.0.2.0 - Production
Start Date 20-ABR-2020 20:02:42
Uptime 0 days 0 hr. 14 min. 9 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Default Service XE
Listener Parameter File C:\oraclexe\app\oracle\product\11.2.0\server\network\admin\listener.ora
Listener Log File C:\oraclexe\app\oracle\diag\tnslsnr\DESKTOP-7AC259Q\listener\alert\log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1ipc)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521)))
Services Summary...
Service "CLRExtProc" has 1 instance(s).
Instance "CLRExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
I guess that as the Listener works, the problem must be on the "tnsnames.ora" file, but I don't find the possible error.
1000 Thank you for advance!
UPDATE: I realize when I try to make the tnsping to the services xe, that they don't response:
C:\Users\manul>tnsping xe
TNS Ping Utility for 64-bit Windows: Version 11.2.0.2.0 - Production on 21-ABR-2020 11:45:53
Copyright (c) 1997, 2014, Oracle. All rights reserved.
Used parameter files:
C:\oraclexe\app\oracle\product\11.2.0\server\network\admin\sqlnet.ora
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = XE)))
OK (0 msec)
Beside I checked that I can to connect to the database via cmd, so the problem is in the conection, and not in database I guess.
C:\WINDOWS\system32>sqlplus
SQL*Plus: Release 11.2.0.2.0 Production on Mar Abr 21 11:55:40 2020
Copyright (c) 1982, 2014, Oracle. All rights reserved.
Enter user-name: hr
Enter password:
Connected to:
Oracle Database 11g Express Edition Release 11.2.0.2.0 - 64bit Production
SQL>
Now I'm really confuse due to I restart the service XE, and I put on automatic, but nothing change.
I cannot get my listener to start, I have spent hours searching forums and couldn't find any solution.
My goal is to start APEX, but first I have to get listener up&running, when I try, I'm getting:
C:\Users\matulewi>lsnrctl start
LSNRCTL for 64-bit Windows: Version 11.2.0.2.0 - Production on 28-GRU-2015 15:20:45
Copyright (c) 1991, 2014, Oracle. All rights reserved.
Starting tnslsnr: please wait...
TNSLSNR for 64-bit Windows: Version 11.2.0.2.0 - Production
System parameter file is C:\oraclexe\app\oracle\product\11.2.0\server\network\admin\listener.ora
Log messages written to C:\oraclexe\app\oracle\diag\tnslsnr\MATULEWI1\listener\alert\log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\.\pipe\EXTPROC1ipc)))
Error listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=MATULEWI1.emea.xxxxx.net)(PORT=1521)))
TNS-12545: Connect failed because target host or object does not exist
TNS-12560: TNS:protocol adapter error
TNS-00515: Connect failed because target host or object does not exist
64-bit Windows Error: 1004: Unknown error
My tnsnames.ora:
XE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = MATULEWI1.emea.xxxxx.net)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = XE)
)
)
EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
)
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
)
)
ORACLR_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
)
(CONNECT_DATA =
(SID = CLRExtProc)
(PRESENTATION = RO)
)
)
listener.ora:
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = C:\oraclexe\app\oracle\product\11.2.0\server)
(PROGRAM = extproc)
)
(SID_DESC =
(SID_NAME = CLRExtProc)
(ORACLE_HOME = C:\oraclexe\app\oracle\product\11.2.0\server)
(PROGRAM = extproc)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
(ADDRESS = (PROTOCOL = TCP)(HOST = MATULEWI1.emea.xxxxx.net)(PORT = 1521))
)
)
DEFAULT_SERVICE_LISTENER = (XE)
Could somebody please help out?
k.
I got this error because I renamed my computer.
Fixed it when I corrected the listener.ora file.
(ADDRESS = (PROTOCOL = TCP)(HOST = YourComputerName)(PORT = 1521))
I had my database working for over a year since yesterday. Out of sudden, I am no longer able to connect.
Error I am getting is:
Status : Failure -Test failed: Listener refused the connection with the following error:
ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
Oracle 11.2
Windows 7
Both db and the listener are up and running. Port 1521 is opened.
C:\Apps\Oracle\product\11.2.0\dbhome_1\BIN>netstat -a -n -o| findstr "1521"
TCP 127.0.0.1:1521 0.0.0.0:0 LISTENING 2412
trying to log in via sqlplus
C:\depot\SBApp\main>sqlplus sbdba0/sbdba0#SBDB
SQL*Plus: Release 11.2.0.2.0 Production on Thu Dec 3 10:04:29 2015
Copyright (c) 1982, 2010, Oracle. All rights reserved.
Error:
ORA-12514: TNS:listener does not currently know of service requested in connect descriptor
Listener.ora
# listener.ora Network Configuration File: C:\Apps\Oracle\product\11.2.0\dbhome_1\NETWORK\ADMIN\listener.ora
# Generated by Oracle configuration tools.
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = CLRExtProc)
(ORACLE_HOME = C:\Apps\Oracle\product\11.2.0\dbhome_1)
(PROGRAM = extproc)
(ENVS = "EXTPROC_DLLS=ONLY:C:\Apps\Oracle\product\11.2.0\dbhome_1\bin\oraclr11.dll")
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
)
)
ADR_BASE_LISTENER = C:\Apps\Oracle\product
tnsnames.ora
ORACLR_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
(CONNECT_DATA =
(SID = CLRExtProc)
(PRESENTATION = RO)
)
)
###################################################################################################
#SBDB
SBDB =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = SBDB)
)
)
ifile=C:\Apps\Oracle\product\11.2.0\dbhome_1\NETWORK\ADMIN\tnsnames_QA.ora
ifile=C:\Apps\Oracle\product\11.2.0\dbhome_1\NETWORK\ADMIN\tnsnames_PROD.ora
I am out of ideas, any help will be appreciated.
solved,
had to replace localhost from *.ora files with my PC hostname.
We have two Oracle instances on one server (both 11g) that are using the same listener. I am having an issue with connecting to the extproc:
TNSNAMES.ORA
EXTPROC_CONNECTION_DATA.NATIONAL.SERVER.COM =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC11G))
)
(CONNECT_DATA =
(SERVICE_NAME = PLSExtProc11g)
)
)
LISTENER.ORA
(DESCRIPTION_LIST=
(DESCRIPTION =
(ADDRESS_LIST=
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC11G))
)
)
)
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc11g)
(ORACLE_HOME = /home/app/oracle/product/11.2.0/dbhome_1)
(ENVS = "EXTPROC_DLLS=ANY")
(PROGRAM = extproc)
)
When I use TNSPING to check the connection, I get the following:
/home/app/oracle/product/11.2.0/dbhome_1/network/admin/sqlnet.ora
$tnsping EXTPROC_CONNECTION_DATA
TNS Ping Utility for Linux: Version 11.2.0.1.0 - Production on 03-NOV-2011 14:03:41
Copyright (c) 1997, 2009, Oracle. All rights reserved.
Used parameter files:
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC11G))) (CONNECT_DATA = (SERVICE_NAME = PLSExtProc11g)))
TNS-12541: TNS:no listener
I am able successfully tnsping both of the databases but not the EXTPROC_CONNECTION_DATA.
In this particular case there was apparently some type of hidden character in the listener.ora file. Using netca to reconfigure the listener resolved the problem.
change the SID_NAME with the correct value, It may solve the issue.
example:
(SID_NAME = PLSExtProc11g)
to
(SID_NAME = ORCL)