It happened when I moved folder content from c:/users/"user" to other user_name (i wanted change name of package). Unfortunately listeners has been deleted and i cant make another (Net configuration assisstant shows me "cant create listener"). When I use command it shows me:
lsnrctl status
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(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=EXTPROC1521)))
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
lsnrctl start
Unable to OpenSCManager: err=5
TNS-12560: TNS:protocol adapter error
TNS-00530: Protocol adapter error
listener.ora
# listener.ora Network Configuration File: E:\app\Xavizo\product\12.1.0\dbhome_1\network\admin\listener.ora
# Generated by Oracle configuration tools.
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = CLRExtProc)
(ORACLE_HOME = E:\app\Xavizo\product\12.1.0\dbhome_1)
(PROGRAM = extproc)
(ENVS = "EXTPROC_DLLS=ONLY:E:\app\Xavizo\product\12.1.0\dbhome_1\bin\oraclr12.dll")
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
)
HOTEL =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = EwciaPC)(PORT = 1521))
)
)
TEST =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = EwciaPC)(PORT = 1521))
)
)
tns.ora
# tnsnames.ora Network Configuration File: E:\app\Xavizo\product\12.1.0\dbhome_1\network\admin\tnsnames.ora
# Generated by Oracle configuration tools.
ORACLE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = oracle)
)
)
LISTENER_ORACLE =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
ORACLR_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
(CONNECT_DATA =
(SID = CLRExtProc)
(PRESENTATION = RO)
)
)
LISTENER_ORCL =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)
Sorry for my english. Hope you can help resolve my problem.
right click powershell and choose run as Administrator
type lsnrctl start LISTENER (or your listener name)
Used this command on powershell with run as Administrator then my problem has resolved.
lsnrctl start
And
lsnrctl status
It's very frustrating to not able to connect to Oracle even with localhost setting.
For me, I have to set the listener to listen on all IP address with 0.0.0.0
Below is my configuration setting:
listener.ora
# listener.ora Network Configuration File: C:\app\thanglequoc\product\21c\homes\OraDB21Home1\NETWORK\ADMIN\listener.ora
# Generated by Oracle configuration tools.
DEFAULT_SERVICE_LISTENER = XE
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = CLRExtProc)
(ORACLE_HOME = C:\app\thanglequoc\product\21c\dbhomeXE)
(PROGRAM = extproc)
(ENVS = "EXTPROC_DLLS=ONLY:C:\app\thanglequoc\product\21c\dbhomeXE\bin\oraclr.dll")
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 0.0.0.0)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
)
tnsnames.ora
# tnsnames.ora Network Configuration File: C:\app\thanglequoc\product\21c\homes\OraDB21Home1\NETWORK\ADMIN\tnsnames.ora
# Generated by Oracle configuration tools.
XE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = XE)
)
)
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)
)
)
Then open CMD/Powershell as Administrator, and start the listener with command
lsnrctl start
and verify the status with
lsnrctl status
Make sure that your db service are successfully binded with handler, it should have something like this
C:\Windows\system32>lsnrctl status
LSNRCTL for 64-bit Windows: Version 21.0.0.0.0 - Production on 13-NOV-2021 07:22:59
Copyright (c) 1991, 2021, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=0.0.0.0)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for 64-bit Windows: Version 21.0.0.0.0 - Production
Start Date 13-NOV-2021 07:19:34
Uptime 0 days 0 hr. 3 min. 25 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Default Service XE
Listener Parameter File C:\app\thanglequoc\product\21c\homes\OraDB21Home1\network\admin\listener.ora
Listener Log File C:\app\thanglequoc\product\21c\diag\tnslsnr\Ivy\listener\alert\log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=0.0.0.0)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1521ipc)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=127.0.0.1)(PORT=5500))(Security=(my_wallet_directory=C:\APP\THANGLEQUOC\PRODUCT\21C\admin\XE\xdb_wallet))(Presentation=HTTP)(Session=RAW))
Services Summary...
Service "2af32cd23e1b490aa03bef05d5c26f6c" has 1 instance(s).
Instance "xe", status READY, has 2 handler(s) for this service...
Service "CLRExtProc" has 1 instance(s).
Instance "CLRExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "XE" has 1 instance(s).
Instance "xe", status READY, has 2 handler(s) for this service...
Service "XEXDB" has 1 instance(s).
Instance "xe", status READY, has 1 handler(s) for this service...
Service "xepdb1" has 1 instance(s).
Instance "xe", status READY, has 2 handler(s) for this service...
The command completed successfully
C:\Windows\system32>
In My case the service "XXXXMTSRecoveryService" was stopped , so when I started this the listener I configured came up and at listening state.
Related
I was trying to Backup and recovery through Oracle 12c and everytime I went to shutdown the database, the listener and tnsnames.ora files get reconfigured and I don't know why. Now, everytime that has happened, I had to go to our DBA and he fixed it. Today he was on leave, so I spent the entire day trying to configure these two files in notepad++. So far I am convinced that what I have written in the tnsnames.ora file is fine. But the issue is with the listener.ora file.
Here are the contents of both of those:
tnsnames.ora file:
ORACLR_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
(CONNECT_DATA =
(SID = CLRExtProc)
(PRESENTATION = RO)
)
)
MISL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = misl)
)
)
JAHIN =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = jahin)
)
)
listener.ora file:
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = CLRExtProc)
(ORACLE_HOME = C:\app\Jahin\product\12.1.0\dbhome_1)
(PROGRAM = extproc)
)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = DESKTOP-TG0P7GL)(PORT = 1521))
)
)
Whenever I try to check the status of the listener through lsnrctl status command, (I stopped and started the process after every change) it gave me a message that it found the service, how many instances it has, but it's status always returned Unknown.
C:\Windows\system32>lsnrctl status
LSNRCTL for 64-bit Windows: Version 12.1.0.2.0 - Production on 27-OCT-2022 16:37:31
Copyright (c) 1991, 2014, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for 64-bit Windows: Version 12.1.0.2.0 - Production
Start Date 27-OCT-2022 16:15:54
Uptime 0 days 0 hr. 21 min. 38 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File C:\app\Jahin\product\12.1.0\dbhome_1\network\admin\listener.ora
Listener Log File C:\app\Jahin\diag\tnslsnr\DESKTOP-TG0P7GL\listener\alert\log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1521ipc)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=DESKTOP-TG0P7GL)(PORT=1521)))
Services Summary...
Service "CLRExtProc" has 1 instance(s).
Instance "CLRExtProc", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
One more thing: whenever I try to login to sqlplus , I get a message saying connected to idle instance. And then it won't let startup or even shutdown the database.
C:\Users\Jahin Catalan Mahbub>sqlplus / as sysdba
SQL*Plus: Release 12.1.0.2.0 Production on Thu Oct 27 15:59:52 2022
Copyright (c) 1982, 2014, Oracle. All rights reserved.
ERROR:
ORA-01017: invalid username/password; logon denied
Enter user-name: sys as sysdba
Enter password:
Connected to an idle instance.
SQL> show parameter
ORA-01034: ORACLE not available
Process ID: 0
Session ID: 0 Serial number: 0
SQL> show parameter uniq
ORA-01034: ORACLE not available
Process ID: 0
Session ID: 0 Serial number: 0
SQL> startup
ORA-00119: invalid specification for system parameter LOCAL_LISTENER
ORA-00132: syntax error or unresolved network name 'LISTENER_MISL'
SQL> exit
Disconnected
any idea where the issue might be? Is it even in any of these places??
Now, AFAIR, when my DBA did it and he confirmed that it was working, the lsnrctl status would return 3 services, each of them had one instance, and every instance status was ready. All commands worked fine. Sunshines and rainbows.
The problem was that I didn't keep a copy of this listener.ora file the very last time he edited it and fixed it. I couldn't get any work done because of this.
I spoke with my DBA today and we have found a solution to my problem. Turns out, the listener.ora was mostly fine. I just needed to add one line to my tnsnames.ora file.
'
LISTENER_MISL = (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
ORACLR_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
(CONNECT_DATA =
(SID = CLRExtProc)
(PRESENTATION = RO)
)
)
MISL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = misl)
)
)
JAHIN =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = jahin)
)
)
'
Here is the minor changes that had been made to the lister.ora file:
''
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = CLRExtProc)
(ORACLE_HOME = C:\app\Jahin\product\12.1.0\dbhome_1)
(PROGRAM = extproc)
(ENVS = "EXTPROC_DLLS=ONLY:C:\app\Jahin\product\12.1.0\dbhome_1\bin\oraclr12.dll")
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = DESKTOP-TG0P7GL)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
)
''
I am not getting any significant errors so far, my DB starts up and shuts down without much issue.
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
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)
I fixed my problem by connecting with system instead of sys. So
conn system/[password]#localhost:1521 as sysdba;
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 tried to connect to Oracle 11g but this is what happens, and not for the first time.
Listener refused the connection with the following error:
ORA-12505, TNS:listener does not currently know of SID given in connect descriptor Vendor code 12505.
Here is 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 = DESKTOP-EJG24HE)(PORT = 1521))
)
)
DEFAULT_SERVICE_LISTENER = (XE)
and tnsnames.ora
XE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = DESKTOP-EJG24HE)(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)
)
)
I tried to do something with it, but I cannot understand where is the problem.
Additional information:
SQL> show parameter service_names
SP2-0640: Not connected
SQL> show parameter local_listener
SP2-0640: Not connected
SQL> alter system set LOCAL_LISTENER='(ADDRESS=(PROTOCOL=TCP)(HOST=DESKTOP-EJG24HE)(PORT=1521))' scope=both;
SP2-0640: Not connected
SQL> alter system register;
SP2-0640: Not connected
SQL> connect as sysdba
Enter user-name: sys
Enter password:
Connected to an idle instance.
I tried to check status of listener and other, but it is not like in my friend's program where it works right.
C:\Users\Sultankhan>lsnrctl status
LSNRCTL for 64-bit Windows: Version 11.2.0.2.0 - Production on 24-╨б╙Ш╨г-2018 13:44:46
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 22-╨б╙Ш╨г-2018 00:56:00
Uptime 2 days 12 hr. 48 min. 45 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-EJG24HE\listener\alert\log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1ipc)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=DESKTOP-EJG24HE)(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
C:\Users\Sultankhan>netstat -an -O | find /i "1521"
TCP 0.0.0.0:1521 0.0.0.0:0 LISTENING 2772
TCP [::]:1521 [::]:0 LISTENING 2772
C:\Users\Sultankhan>tnsping xe
TNS Ping Utility for 64-bit Windows: Version 11.2.0.2.0 - Production on 24-╨б╙Ш╨г-2018 13:35:00
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 = DESKTOP-EJG24HE)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = XE)))
OK (0 msec)
I have a problem with Oracle Express Edition. I can open and run commands in the Data Base by using sqlplus, but then I try to connect to Data Base by using sql developer it doesn't work. It's strange because I have many other remote Oracle databases and I can connect to them by using sql developer or other tools like IDEA. May be something wrong with listener?
When I try to connect I get timed out on connection to port 1521.
Connection to #myhost.company.com failed.
lsnrctl status
LSNRCTL for 32-bit Windows: Version 11.2.0.2.0 - Production on 22-╤┼═-2017 12:04:43
Copyright (c) 1991, 2010, Oracle. All rights reserved.
TNS-01106: Listener using listener name LISTENER has already been started
C:\Users\luchser>lsnrctl status
LSNRCTL for 32-bit Windows: Version 11.2.0.2.0 - Production on 22-╤┼═-2017 12:11:20
Copyright (c) 1991, 2010, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for 32-bit Windows: Version 11.2.0.2.0 - Production
Start Date 21-╤┼═-2017 14:21:26
Uptime 0 days 21 hr. 49 min. 53 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\localhost\listener\alert\log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1ipc)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=myhost.company.com)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=myhost.company.com)(PORT=8080))(Presentation=HTTP)(Session=RAW))
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...
Service "XEXDB" has 1 instance(s).
Instance "xe", status READY, has 1 handler(s) for this service...
Service "xe" has 1 instance(s).
Instance "xe", status READY, has 1 handler(s) for this service...
The command completed successfully
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 = myhost.company.com)(PORT = 1521)(IP=V4_ONLY))
)
)
DEFAULT_SERVICE_LISTENER = (XE)
tnsnames.ora
XE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = myhost.company.com)(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)
)
)
tnsping XE 10
C:\Users\luchser>tnsping XE 10
TNS Ping Utility for 32-bit Windows: Version 11.2.0.2.0 - Production on 26-╤┼═-2017 14:49:12
Copyright (c) 1997, 2010, 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 = myhost.company.com)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = XE)))
OK (0 msec)
OK (10 msec)
OK (0 msec)
OK (0 msec)
OK (20 msec)
OK (0 msec)
OK (0 msec)
OK (10 msec)
OK (0 msec)
OK (20 msec)
sqlplus user/password#XE
C:\Users\luchser>sqlplus my_user/my_password#XE
SQL*Plus: Release 11.2.0.2.0 Production on ┬Є ╤хэ 26 14:50:11 2017
Copyright (c) 1982, 2010, Oracle. All rights reserved.
The last just hags and nothing happens.
In this configuration, listener.ora and tnsnames.ora.
You can make a connection only on the local database, you can not make a remote connection to the database, because The listener listens only to IP localhost.
You must add an external IP to the listener configuration. listener.ora
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521)(IP=V4_ONLY))
(ADDRESS = (PROTOCOL = TCP)(HOST = <IP DB server>)(PORT = 1521)(IP=V4_ONLY))
)
)
Add an exception for port 1521 and port range (32768-65536) for the firewall on the database server, this is necessary for the SQL * NET protocol.
On the client machine, you need to fix tnsnames.ora,
It is necessary to replace localhost with the IP address of the database server.
XE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = <IP DB server>)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = XE)
)
)