ORA-12541: TNS: no listener - oracle

I have a VM in Oracle VM Virtual Box running Windows XP. In this VM, I have install Visual Studio .net 2003 with nhibertante ORM to connect to BBDD Oracle 12.2.
Oracle database is hosts in my physical machine with Windows 11 SO. The network configuration between VM and host that ok, or I suppose it, because the ping network servicio work ok.
In my VM I run a SQL*Plus command interface and I try to connect to Oracle database in the host machine.
I use the follow command: sqlplus user/pass#service
Well, the error I receive is:
ORA-12541: TNS: no listener
Maybe some configuration in listener.ora or tnsname.ora not be ok, but I tried modify several parameter but it didn't work.
My tnsname.ora in VM is:
`LISTENER =
(ADDRESS =
(PROTOCOL = TCP)
(HOST = 192.168.56.7)
(PORT = 1521)
)
orcl =
(DESCRIPTION =
ADDRESS =
our text`(PROTOCOL = TCP)
(HOST = 192.168.56.7)
(PORT = 1521)
)
(CONNECT_DATA =
(SERVER = dedicated)
(SERVICE_NAME = orcl)
)
)
`
My listener.ora in my host machine is:
`SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = orcl)
(ORACLE_HOME = C:\app\orclDiego\product\12.2.0\dbhome_1)
(PROGRAM = extproc)
(ENVS = "EXTPROC_DLLS=ONLY:C:\app\orclDiego\product\12.2.0\dbhome_1\bin\oraclr12.dll")
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.56.7)(PORT = 1521))
)
)
`

Related

TNS-12545: Connect failed because target host or object does not exist

I am trying to configure Oracle database 18C on Azure cloud VM.
I have installed the Oracle database and now I am trying to configure Listener
I have set up a public static IPv4 address for the VM
When I am trying to add the IP address in the listener and tnsnames file, I am getting this error
Error listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=IP)(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: 49: Unknown error
Here is my listener.ora and tsnnames.ora file configuration.
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = CLRExtProc)
(PROGRAM = extproc)
(ENVS = "EXTPROC_DLLS=ONLY:E:\app\Oracle\product\11.2.0\dbhome_1\bin\oraclr11.dll")
)
(SID_DESC =
(SID_NAME = ORCL)
)
)
LISTENER =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = IPaddress)(PORT = 1521))
)
ADR_BASE_LISTENER = C:\Oracle\Oracle18C\log
ORCL =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = IPaddress)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = orcl)
)
)
Ping is working for the IP address when I try with my local machine
When I tried using the hostname 'oraclevm' then listener was able to start up
the following a working example for listener.ora
[oracle#ol7-19 ~]$ cd $ORACLE_HOME/network/admin
[oracle#ol7-19 admin]$ more listener.ora
# listener.ora Network Configuration File: /home/oracle/Downloads/19c/network/admin/listener.ora
# Generated by Oracle configuration tools.
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = ol7-19.localdomain)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)

listener is not working

LSNRCTL> status
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=abc.domain.com)(PORT=1521)))
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
TNS-00511: No listener
Linux Error: 111: Connection refused
I have registered 1518 using following command
Alter system register
can connect with sql developer using 1518 as port but cannot connect using port 1521
listener.ora file is
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = orcl)
(ORACLE_HOME = /u01/app/oracle/product/11.2.0/db_1)
(SID_NAME = ORCL)
)
)
tnsnames.ora file is
ORCL =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = abc.domain.com)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = orcl)
)
)

ORA-12170: TNS:Connect timeout occurred When try to connect from host OS

I have Oracle Database 11g Express Edition Release 11.2.0.2.0 - 64bit Production installed on virtual machine(VirtualBox, OS: Oracle Linux 7).
All going normal, when I try to connect from the virtual machine where oracle database installed. (sqlplus sys/sys_password#192.168.56.101/XE as sysdba).
But I have ORA-12170 error when I try to connect to oracle from the host OS (Windown 7 x64) by using the same command.
ping 192.168.56.101 command from host OS is successfull.
Now I'm using host only network, but I had same results with bridged connection.
Here is my tnslistener.ora file:
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = XE)
(ORACLE_HOME = /u01/app/oracle/product/11.2.0/xe)
)
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /u01/app/oracle/product/11.2.0/xe)
(PROGRAM = extproc)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost.localdomain)(PORT = 1521))
)
)
DEFAULT_SERVICE_LISTENER = (XE)
What am I doing wrong?
It seems your listener is incorrectly configured. If you use localhost.localdomain as HOST then the listener will bind to loopback interface only.
Try to use actual IP address instead of localhost.localdomain. Also you can use 0.0.0.0 as HOST so the listener will bind to any interface to avoid hardcoded IP address, but I don't recommend this on production server.
Also check if your guest firewall does allow TCP communication on 1521 port.
Following is my working listener.ora:
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /u01/app/oracle/product/11.2.0/xe)
(PROGRAM = extproc)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
(ADDRESS = (PROTOCOL = TCP)(HOST = 0.0.0.0)(PORT = 1521))
)
)
DEFAULT_SERVICE_LISTENER = (XE)

TNS listener does not correctly know of the SID given in connect descriptor

I went through the posts that suggested solutions to the same error but could not fix. I am on windows 8 and on tryign to runa java program that connects to oracle database by Type 4 driver, I am getting this error:
On running, lsnrctl status
and this is inside my listener.ora
# listener.ora Network Configuration File: C:\oracle\product\10.2.0\db_2\network\admin\listener.ora
# Generated by Oracle configuration tools.
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = C:\oracle\product\10.2.0\db_2)
(PROGRAM = extproc)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
(ADDRESS = (PROTOCOL = TCP)(HOST = HP)(PORT = 1521))
)
)
String that I used to connect to it in my java program is as follows:
"jdbc:oracle:thin:#localhost:1521:XE"
How can I fix this?

Oracle on Mac OSX, access from a virtual machine

I've installed Oracle on Mac OSX Snowleopard following the guide of Raimonds Simanovskis, as far as I know the only working installation guide for Snowleopard.
As long as I use Oracle only on the Mac under MacOX itself, it works well, no problems.
Now I have a virtual machine on the Mac (Parallels Desktop 5), and in this VM Windows XP is running. I want to access the Oracle database, which is running on Mac OSX, from the VM under Windows. Logically it is like accessing from a different computer. But always when I try to access from XP, for example with sqlplus
sqlplus iwes/iwes#192.168.3.2:1521/dbname
(192.168.3.2 it the address of MacOS using 'Host only networking'. This address is working well in other applications.)
then I get the error message
ERROR:
ORA-12541: TNS: Kein Listener [German for: "no listener"]
(on Mac OSX both Oracle and the listener are started and working)
What is wrong or missing in my Oracle installation?
Here is my listener.ora
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /opt/oracle/product/10.2.0/db_1)
(PROGRAM = extproc)
)
(SID_DESC =
(SID_NAME = dbname)
(ORACLE_HOME = /opt/oracle/product/10.2.0/db_1)
(GLOBAL_DBNAME = dbname)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
)
)
and my tnsnames.ora
dbname =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = dbname)
)
)
EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
)
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
)
)
your listener.ora should specify 192.168.3.2 as host, instead of localhost.
your tnsnames.ora should specify 192.168.3.2 as host for alias dbname (if you use tnsnames.ora at all)
In your example you don't use tnsnames.ora but jump directly to the mac's ip-address.
Also check the firewall on the mac.

Resources