TNS-12541: TNS:no listener - database

I have issue with LISTENER so I can't start listener with :
>lsnrctl status LISTENER
LSNRCTL for 64-bit Windows: Version 19.0.0.0.0 - Production on 09-MAR-2022 16:07:04
Copyright (c) 1991, 2020, Oracle. All rights reserved.
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521)) TNS-12541: TNS:no listener TNS-12560: TNS:protocol adapter error TNS-00511: No listener 64-bit Windows Error: 61: Unknown error
Same error with the lsnrctl reload
When I try to restart it from services windows I have the issue :services on local computer started and stopped
As mentioned in the Snape below
enter image description here
This is listener.ora:
# listener.ora Network Configuration File: C:\app\instantclient_19_8\NETWORK\admin\listener.ora
# Generated by Oracle configuration tools.
SID_LIST_LISTENER_UBIX =
(SID_LIST =
(SID_DESC =
(SID_NAME = CLRExtProc)
(ORACLE_HOME = C:\app\E5665551\product\19.3.0\dbhome19c)
(PROGRAM = extproc)
(ENVS = "EXTPROC_DLLS=ONLY:C:\app\E5665551\product\19.3.0\dbhome19c\bin\oraclr19.dll")
)
(SID_DESC =
(GLOBAL_DBNAME = ubix)
(ORACLE_HOME = C:\app\E5665551\product\19.3.0\dbhome19c)
(SID_NAME = ubix2)
)
)
ADR_BASE_LISTENER_UBIX = C:\app\e5665551
SAVE_CONFIG_ON_STOP_LISTENER_UBIX = TRUE
LISTENER_UBIX =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = EMEA-TUN-LP0872.FNFIS.com)(PORT = 1521))
)
and the tnsnames file :
# tnsnames.ora Network Configuration File: C:\app\E5665551\product\19.3.0\dbhome19c\network\admin\tnsnames.ora
# Generated by Oracle configuration tools.
ORACLR_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
(CONNECT_DATA =
(SID = CLRExtProc)
(PRESENTATION = RO)
)
)
UBIX =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = EMEA-TUN-LP0872.FNFIS.com)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = UBIX)
)
)
LISTENER_UBIX =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = EMEA-TUN-LP0872.FNFIS.com)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
)
and the log file:
LISTENER for 64-bit Windows: Version 19.0.0.0.0 - Production
Version 19.10.0.0.0
Message 459 not found; No message file for product=NETWORK, facility=NL
Message 279 not found; No message file for product=NETWORK, facility=NL
Message 509 not found; No message file for product=NETWORK, facility=NL
Message 510 not found; No message file for product=NETWORK, facility=NL
Message 1081 not found; No message file for product=NETWORK, facility=TNS
Message 1074 not found; No message file for product=NETWORK, facility=TNS
Message 1050 not found; No message file for product=NETWORK, facility=TNS
I ask if the problem with security update my block the service of listener ?
>sc.exe query OracleOraDB19Home1TNSListenerORACLE19C
SERVICE_NAME: OracleOraDB19Home1TNSListenerORACLE19C
TYPE : 10 WIN32_OWN_PROCESS
STATE : 1 STOPPED
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0
I try to start it by the command line :
sc start OracleOraDB19Home1TNSListenerORACLE19C
also with killing the service
taskkill /pid 94196 /F
THE service still stuck on STOPPED it's the same issue please any help ?

Related

ORA-12505: Listener refused the connection with the following error -- SQL Developer

In the past i got no problem doing this, but when i've reinstalled Oracle 11g and SQL Developer, i got in troubles. I am trying to connect my oracle 11g database to sql developer, but when I test the connection, I get this error. I tried everything: config file, tnsnames.ora changed several times, listener.ora file changed, but it was all in vain. I have seen many videos or posts dealing with the error, and they all say to look at the match between the SID and the Host name/Service name in the tnsnames.ora file, but in my case they are correct and coincide. Can anyone help me out? I've deleted everything: files, env variables etc.
When i open SQL Developer, it automatically detects the tns file, so it is actually read, so I don't understand what the problem could be.
This is my tnsnames.ora
XE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = LAPTOP-SMTRG338)(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)
)
)
This is the listener
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 = LAPTOP-SMTRG338)(PORT = 1521))
)
)
DEFAULT_SERVICE_LISTENER = (XE)
Basic connection does not make use of the tnsnames.ora file.
Basic is EZConnect: user/pass#host:port/SERVICE_NAME
You can try to check "Nombre servizio" and set it to XE and connect, but I do not think it will solve your problem.
For scenarios like this, the alert_<SID>.log is your friend. Here you can diagnose the database health.
Your Windows Service can be running, but your database can be in any of these modes: shutdown | nomount | mount | open
%ORACLE_BASE%\diag\rdbms\xe\XE\trace\alert_XE.log
Note! Please do not use notepad.exe reading log-files. In Windows-land Notepad++ is a better option.
Best of luck!

Oracle DB connection between two computers

I have Computer A , IP = 10.20.30.40 (that store the Oracle Database)
I have Computer B , IP = 10.20.30.50 (with this computer i want to connect)
I have used connection string:
Data Source = LOCALHOST , User = SYSTEM , Password = xxxxx
Its works fine in Computer A. Even i can connect it as
Data Source = 10.20.30.40 , User = SYSTEM , Password = xxxxx
How I can Connect from Computer B - to - Computer A ?
What are the requirements for Computer B Should have??
My tnsnames.ora on Computer A contains info like this:
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 = EXTPROC_FOR_XE))
)
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
)
)
ORACLR_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
)
(CONNECT_DATA =
(SID = CLRExtProc)
I'm very new with Oracle, anyone can help some step by step easy guide how to configure this situation?
On computer B you will need to use the IP address of computer A (machine running the database).
localhost refers to the local machine.

Suddenly getting ORA-12514 error Oracle 11gr2

I installed Oracle 11g r2 fine, had 2 databases (se3 and mydb, both have db_domain .orcl i.e. mydb.orcl and se3.orcl) running on it fine till yesterday. but suddenly im getting ORA-12514 error (TNS:listener doesn't know of service requested in connect descriptor)..
My tnsnames.ora file:
# tnsnames.ora Network Configuration File: G:\oracledb\product\11.2.0\dbhome_1\network\admin\tnsnames.ora
# Generated by Oracle configuration tools.
LISTENER_MYDB =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
ORACLR_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
(CONNECT_DATA =
(SID = CLRExtProc)
(PRESENTATION = RO)
)
)
MYDB =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = mydb.orcl)
)
)
SE3 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = se3.orcl)
)
)
LISTENER_SE3 =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
LISTENER.ORA FILE:
# listener.ora Network Configuration File: G:\oracledb\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 = G:\oracledb\product\11.2.0\dbhome_1)
(PROGRAM = extproc)
(ENVS = "EXTPROC_DLLS=ONLY:G:\oracledb\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 = G:\oracledb
I am able to "tnsping mydb/se3" fine.. Tried to change tnsnames.ora and listener.ora files too (now restored) but cannot connect to either one of them through sqlplus or sqldeveloper/visual studio.. plz help me.. thanks!
Based on your own comment "im able to set ORACLE_SID but cannot connect via sqlplus ... ORA-01034 - Oracle not available" it's likely that your database instances are down. It is theoretically possible to have the underlying Windows service OracleServiceMYDB running and corresponding oracle.exe in processes, but the database instance being down. Your best bet is to look on the server for the trace directory containing alert_mydb.log and review the last entries.
If the database is simply not running and alert log shows no serious errors, start it like this:
set ORACLE_SID=MYDB
set ORACLE_HOME=D:\my\oracle\home
%ORACLE_HOME%\bin\sqlplus "/ as sysdba"
ORACLE not available.
SQL> STARTUP
SQL> EXIT
lsnrctl services
The last command should show MYDB is registered.
Proceed with ORACLE_SID=SE3
In my case, I received the ORA-12514 error when attempting to connect via SQL*Plus from a client-only machine to a remote database:
C:\Temp>sqlplus username#connect_descriptor
SQL*Plus: Release 11.2.0.3.0 Production on Wed Sep 24 09:43:04 2014
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Enter password:
ERROR:
ORA-12514: TNS:listener does not currently know of service requested in connect
descriptor
I found this puzzling because tnsping responded successfully:
C:\Temp>tnsping connect_descriptor
TNS Ping Utility for 32-bit Windows: Version 11.2.0.3.0 - Production on 24-SEP-2
014 09:48:04
Copyright (c) 1997, 2011, Oracle. All rights reserved.
Used parameter files:
D:\Oracle\product\11.2.0\client_1\network\admin\sqlnet.ora
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = host
.intranet.com)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME =
HOST13)))
OK (20 msec)
Ultimately, I tracked down my problem as an incorrect SERVICE_NAME value in my tnsnames.ora file:
CONNECT_DESCRIPTOR =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = host.intranet.com)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = HOST13)
)
)
After changing HOST13 (via an ordinary text editor) to the correct value for SERVICE_NAME, I was able to connect to the remote Oracle database.
On my Oracle 11.2 client machine, here is the location of tnsnames.ora:
C:\Oracle\product\11.2.0\client_1\network\admin\tnsnames.ora

oracle 11g r2 install error - ORA-00119: invalid specification for system parameter LOCAL_LISTENER

I keep getting this error after I installed Oracle 11g R2 database server in my 64 bit machine
startup failed: ORA-00119: invalid specification for system parameter LOCAL_LISTENER
ORA-00132: syntax error or unresolved network name 'LISTENER_ORLL', please help.
I can't even modify the spfile because I can't connect to the instance; database has not started, so there is no way to create pfile from spfile.
tnsnames.ora entry
LISTENER_ORLL.WORLD =
(ADDRESS =
(PROTOCOL = TCP)
(HOST = localhost)(PORT = 1521))
listener.ora entry
SID_LIST_LISTENER =(SID_LIST =
(SID_DESC =
(SID_NAME = CLRExtProc)
(ORACLE_HOME = C:\app\username\product\11.2.0\dbhome_1)
(PROGRAM = extproc)
(ENVS = "EXTPROC_DLLS=ONLY:C:\app\username\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))
)
)

Sometimes isql doesn't connect and tsql does

I am stuck with a problem that happens sometimes around unixODBC and freeTDS. I have a CentOS webserver where I have settled configuration files as:
odbc.ini:
[XYZ]
Driver = FreeTDS
Server = X.X.X.X
Port = 1433
Database = mydatabase
TDS_Version = 8.0
odbcinst.ini
[PostgreSQL]
Description = ODBC for PostgreSQL
Driver = /usr/lib/libodbcpsql.so
Setup = /usr/lib/libodbcpsqlS.so
FileUsage = 1
[FreeTDS]
Description = v0.82 with protocol v8.0
Driver = /usr/local/lib/libtdsodbc.so
Setup = /usr/local/lib/libtdsodbc.so
UsageCount = 1
Trace = Yes
TraceFile = /tmp/freetds.log
ForceTrace = Yes
FileUsage = 1
[ODBC]
;Trace = Yes
;TraceFile = /tmp/freetds.log
;ForceTrace = Yes
;Pooling = No
freetds.conf
# $Id: freetds.conf,v 1.12 2007/12/25 06:02:36 jklowden Exp $
#
# This file is installed by FreeTDS if no file by the same
# name is found in the installation directory.
#
# For information about the layout of this file and its settings,
# see the freetds.conf manpage "man freetds.conf".
# Global settings are overridden by those in a database
# server specific section
[global]
# TDS protocol version
tds version = 8.0
# Whether to write a TDSDUMP file for diagnostic purposes
# (setting this to /tmp is insecure on a multi-user system)
; dump file = /tmp/freetds.log
; debug flags = 0xffff
# Command and connection timeouts
; timeout = 10
; connect timeout = 10
# If you get out-of-memory errors, it may mean that your client
# is trying to allocate a huge buffer for a TEXT field.
# Try setting 'text size' to a more reasonable limit
text size = 64512
# A typical Sybase server
[egServer50]
host = symachine.domain.com
port = 5000
tds version = 5.0
# A typical Microsoft server
[egServer70]
host = ntmachine.domain.com
port = 1433
tds version = 7.0
[XYZ]
host = X.X.X.X
port = 1433
tds version = 8.0
and doing isql -v XYZ username password when it won't connect it gives out this trace log:
[ODBC][22870][__handles.c][444]
Exit:[SQL_SUCCESS]
Environment = 0x938ab58
[ODBC][22870][SQLAllocHandle.c][345]
Entry:
Handle Type = 2
Input Handle = 0x938ab58
[ODBC][22870][SQLAllocHandle.c][463]
Exit:[SQL_SUCCESS]
Output Handle = 0x938b130
[ODBC][22870][SQLConnect.c][3549]
Entry:
Connection = 0x938b130
Server Name = [XYZ][length = 14 (SQL_NTS)]
User Name = [username][length = 11 (SQL_NTS)]
Authentication = [*************][length = 13 (SQL_NTS)]
UNICODE Using encoding ASCII 'ISO8859-1' and UNICODE 'UCS-2LE'
DIAG [42000] [FreeTDS][SQL Server]Login failed for user 'username'.
DIAG [42000] [FreeTDS][SQL Server]Cannot open database "mydatabase" requested by the login. The login failed.
DIAG [S1000] [FreeTDS][SQL Server]Unable to connect to data source
[ODBC][22870][SQLConnect.c][3917]
Exit:[SQL_ERROR]
[ODBC][22870][SQLError.c][424]
Entry:
Connection = 0x938b130
SQLState = 0xbf8ba54e
Native = 0xbf8ba350
Message Text = 0xbf8ba359
Buffer Length = 500
Text Len Ptr = 0xbf8ba356
[ODBC][22870][SQLError.c][461]
Exit:[SQL_SUCCESS]
SQLState = S1000
Native = 0xbf8ba350 -> 0
Message Text = [[unixODBC][FreeTDS][SQL Server]Unable to connect to data source]
[ODBC][22870][SQLError.c][424]
Entry:
Connection = 0x938b130
SQLState = 0xbf8ba54e
Native = 0xbf8ba350
Message Text = 0xbf8ba359
Buffer Length = 500
Text Len Ptr = 0xbf8ba356
[ODBC][22870][SQLError.c][461]
Exit:[SQL_SUCCESS]
SQLState = 37000
Native = 0xbf8ba350 -> 4060
Message Text = [[unixODBC][FreeTDS][SQL Server]Cannot open database "mydatabase" requested by the login. The login failed.]
[ODBC][22870][SQLError.c][424]
Entry:
Connection = 0x938b130
SQLState = 0xbf8ba54e
Native = 0xbf8ba350
Message Text = 0xbf8ba359
Buffer Length = 500
Text Len Ptr = 0xbf8ba356
[ODBC][22870][SQLError.c][461]
Exit:[SQL_SUCCESS]
SQLState = 37000
Native = 0xbf8ba350 -> 18456
Message Text = [[unixODBC][FreeTDS][SQL Server]Login failed for user 'username'.]
[ODBC][22870][SQLError.c][424]
Entry:
Connection = 0x938b130
SQLState = 0xbf8ba54e
Native = 0xbf8ba350
Message Text = 0xbf8ba359
Buffer Length = 500
Text Len Ptr = 0xbf8ba356
[ODBC][22870][SQLError.c][461]
Exit:[SQL_NO_DATA]
[ODBC][22870][SQLError.c][504]
Entry:
Environment = 0x938ab58
SQLState = 0xbf8ba54e
Native = 0xbf8ba350
Message Text = 0xbf8ba359
Buffer Length = 500
Text Len Ptr = 0xbf8ba356
[ODBC][22870][SQLError.c][541]
Exit:[SQL_NO_DATA]
[ODBC][22870][SQLFreeHandle.c][268]
Entry:
Handle Type = 2
Input Handle = 0x938b130
[ODBC][22870][SQLFreeHandle.c][317]
Exit:[SQL_SUCCESS]
[ODBC][22870][SQLFreeHandle.c][203]
Entry:
Handle Type = 1
Input Handle = 0x938ab58
when tsql command works... what could be?
unixODBC version is 2.2.11-7.1 and freeTDS doesn't appear as installed but it there is since there are present libtdsodbc.so in /usr/local/lib..
I have also to say only with a complete reboot of CentOS machine isql goes back working well...
What I can do or check? Thanks a lot in advance!
Cheers,
Luigi
you should fix odbc.ini to have a servername as configured at freetds.conf
instead of "Server = x.x.x.x" put "servername = XYZ"

Resources