I have installed Oracle 11g version - Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production.
I have created a user called K_demo. But I am not able to connect to the user using sqlplus. Getting below error.
SQL*Plus: Release 11.2.0.1.0 Production on Sun Apr 16 10:35:08 2017
Copyright (c) 1982, 2010, Oracle. All rights reserved.
ERROR:
ORA-12154: TNS:could not resolve the connect identifier specified
Enter user-name:**
Although I am able to connect from sys using conn
SQL> conn K_DEMO/"pass#123"#ORCL
Connected.
SQL> show user;
USER is "K_DEMO"
SQL>
what could be the reason?
Related
I am just starting to get my feet wet in Red Hat Linux 7.2 and Oracle 12c. So I spent last weekend devoted to in an attempt to see if I could stand up Oracle 12c on RHEL 7.2. In the end and yes, I was able to stand up Oracle on a RHEL 7.2 VM but not without problems - a lot of them. But I managed to resolve
them one at a time. I blew away my VM and started everything from scratch again.
Now I think I have a pretty good setup up & running. The only thing I don't understand is when I reboot my Linux box, both the Oracle listner and the database service do not start automatically as they do on a Windows Server 2012 R2 system. If these services are not running, naturally I can't connect
to the Oracle DB. To fix it, I have to run these two commands:
Logon as the oracle user
Run lsnrctl start
I will see a message something like: The listener supports no services
This is fine.
Connect to the database and run
sql>startup
After that, everything is running as normal. I can connect to the Oracle db from any Oracle client. My questions are: Is this the normal behavior on a Linux box? Did I miss something during the Oracle install? If these services are supposed to start automatically, what do I need to do to fix this?
Thank you.
This error solution is very simple, first, let's understand why this error occurs. It basically has two reasons which are:
1) Your database and service name is not properly set in Oracle environment it should be same everywhere check below parameter values
-ORACLE_SID in oracle environment.
-SID_NAME in tnsnames.ora file.
-SERVICE_NAME in listener.ora file.
2) Host name/IP address is missing, not correct or spelling mistake, so please check the below.
-Check the IP ADDRESS in /etc/hosts file.
-It should be same in listener.ora and tnsnames.ora file
-And it should be able to ping from the local and remote server.
Now see I've also faced the same problem and resolved:
[oracle#OLE1 Desktop]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Wed Jul 12 22:52:29 2017
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area 970895360 bytes
Fixed Size 1340636 bytes
Variable Size 713034532 bytes
Database Buffers 251658240 bytes
Redo Buffers 4861952 bytes
Database mounted.
Database opened.
SQL>
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle#OLE1 Desktop]$
[oracle#OLE1 Desktop]$ lsnrctl
LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 12-JUL-2017 22:54:51
Copyright (c) 1991, 2009, Oracle. All rights reserved.
Welcome to LSNRCTL, type "help" for information.
LSNRCTL> status
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
TNS-00511: No listener
Linux Error: 111: Connection refused
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=ole1)(PORT=1521)))
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
TNS-00511: No listener
Linux Error: 111: Connection refused
LSNRCTL> LSNRCTL> start
Starting /home/oracle/app/oracle/product/11.2.0/dbhome_1//bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 11.2.0.1.0 - Production
System parameter file is /home/oracle/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Log messages written to /home/oracle/app/oracle/diag/tnslsnr/OLE1/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ole1)(PORT=1521)))
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date 12-JUL-2017 22:55:43
Uptime 0 days 0 hr. 0 min. 23 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /home/oracle/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Listener Log File /home/oracle/app/oracle/diag/tnslsnr/OLE1/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ole1)(PORT=1521)))
The listener supports no services
The command completed successfully
LSNRCTL> [oracle#OLE1 Desktop]$
[oracle#OLE1 Desktop]$
[oracle#OLE1 Desktop]$ echo $ORACLE_SID
orcl
[oracle#OLE1 Desktop]$
[oracle#OLE1 admin]$ cat tnsnames.ora
# tnsnames.ora Network Configuration File: /home/oracle/app/oracle/product/11.2.0/dbhome_1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.
ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = ole1)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)
[oracle#OLE1 admin]$
[oracle#OLE1 admin]$ cat listener.ora
# listener.ora Network Configuration File: /home/oracle/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
# Generated by Oracle configuration tools.
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = ole1 )(PORT = 1521))
)
)
ADR_BASE_LISTENER = /home/oracle/app/oracle
[oracle#OLE1 admin]$
[oracle#OLE1 admin]$ cat /etc/hosts
127.0.0.1 localhost
::1 localhost
192.168.244.128 ole1
[oracle#OLE1 admin]$
[oracle#OLE1 ~]$ tnsping orcl
TNS Ping Utility for Linux: Version 11.2.0.1.0 - Production on 12-JUL-2017 22:57:14
Copyright (c) 1997, 2009, Oracle. All rights reserved.
Used parameter files:
/home/oracle/app/oracle/product/11.2.0/dbhome_1/network/admin/sqlnet.ora
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = ole1)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl)))
TNS-12541: TNS:no listener
[oracle#OLE1 ~]$
[oracle#OLE1 ~]$ lsnrctl
LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 12-JUL-2017 23:01:48
Copyright (c) 1991, 2009, Oracle. All rights reserved.
Welcome to LSNRCTL, type "help" for information.
LSNRCTL>
LSNRCTL>
LSNRCTL> reload
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
The command completed successfully
LSNRCTL>
LSNRCTL> status
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date 12-JUL-2017 22:55:43
Uptime 0 days 0 hr. 6 min. 37 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /home/oracle/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Listener Log File /home/oracle/app/oracle/diag/tnslsnr/OLE1/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ole1)(PORT=1521)))
The listener supports no services
The command completed successfully
LSNRCTL> stop
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
The command completed successfully
LSNRCTL> start
Starting /home/oracle/app/oracle/product/11.2.0/dbhome_1//bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 11.2.0.1.0 - Production
System parameter file is /home/oracle/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Log messages written to /home/oracle/app/oracle/diag/tnslsnr/OLE1/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ole1)(PORT=1521)))
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date 12-JUL-2017 23:03:10
Uptime 0 days 0 hr. 0 min. 21 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /home/oracle/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Listener Log File /home/oracle/app/oracle/diag/tnslsnr/OLE1/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ole1)(PORT=1521)))
The listener supports no services
The command completed successfully
LSNRCTL>
[oracle#OLE1 ~]$
[oracle#OLE1 ~]$
[oracle#OLE1 ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Wed Jul 12 23:04:37 2017
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> select name from v$database;
NAME
---------
ORCL
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle#OLE1 ~]$
[oracle#OLE1 admin]$ cat /etc/hosts
127.0.0.1 localhost
::1 localhost
192.168.244.128 ole1
[oracle#OLE1 admin]$ ping ole1
PING ole1 (192.168.244.128) 56(84) bytes of data.
^C
--- ole1 ping statistics ---
14 packets transmitted, 0 received, 100% packet loss, time 13710ms
[oracle#OLE1 admin]$
Note: Now here I found the problem in IP address configuration its not pinging, So i did some changes in eth1 driver of my OS in VMware machine.
[oracle#OLE1 admin]$ ping ole1
PING ole1 (192.168.244.128) 56(84) bytes of data.
64 bytes from ole1 (192.168.244.128): icmp_seq=1 ttl=64 time=0.694 ms
64 bytes from ole1 (192.168.244.128): icmp_seq=2 ttl=64 time=0.187 ms
64 bytes from ole1 (192.168.244.128): icmp_seq=3 ttl=64 time=4.96 ms
64 bytes from ole1 (192.168.244.128): icmp_seq=4 ttl=64 time=0.121 ms
64 bytes from ole1 (192.168.244.128): icmp_seq=5 ttl=64 time=0.082 ms
64 bytes from ole1 (192.168.244.128): icmp_seq=6 ttl=64 time=0.166 ms
64 bytes from ole1 (192.168.244.128): icmp_seq=7 ttl=64 time=0.126 ms
^C
--- ole1 ping statistics ---
7 packets transmitted, 7 received, 0% packet loss, time 6996ms
rtt min/avg/max/mdev = 0.082/0.905/4.963/1.668 ms
[oracle#OLE1 admin]$
[oracle#OLE1 admin]$
[oracle#OLE1 admin]$ lsnrctl
LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 12-JUL-2017 23:09:37
Copyright (c) 1991, 2009, Oracle. All rights reserved.
Welcome to LSNRCTL, type "help" for information.
LSNRCTL> stop
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
The command completed successfully
LSNRCTL>
LSNRCTL>
LSNRCTL> start
Starting /home/oracle/app/oracle/product/11.2.0/dbhome_1//bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 11.2.0.1.0 - Production
System parameter file is /home/oracle/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Log messages written to /home/oracle/app/oracle/diag/tnslsnr/OLE1/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ole1)(PORT=1521)))
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date 12-JUL-2017 23:09:45
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /home/oracle/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Listener Log File /home/oracle/app/oracle/diag/tnslsnr/OLE1/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ole1)(PORT=1521)))
The listener supports no services
The command completed successfully
LSNRCTL>
LSNRCTL>
LSNRCTL> status
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date 12-JUL-2017 23:09:45
Uptime 0 days 0 hr. 2 min. 17 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /home/oracle/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Listener Log File /home/oracle/app/oracle/diag/tnslsnr/OLE1/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ole1)(PORT=1521)))
Services Summary...
Service "orcl" has 1 instance(s).
Instance "orcl", status READY, has 1 handler(s) for this service...
Service "orclXDB" has 1 instance(s).
Instance "orcl", status READY, has 1 handler(s) for this service...
The command completed successfully
[oracle#OLE1 admin]$
[oracle#OLE1 admin]$
[oracle#OLE1 admin]$ sqlplus scott/tiger#orcl
SQL*Plus: Release 11.2.0.1.0 Production on Thu Jul 13 00:15:48 2017
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL>
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle#OLE1 admin]$
Now it's running fine for me, I hope it will help.
Thanks!
You should check listener log for details.
Find listener log location with:
$ lsnrctl stat
LSNRCTL for Linux: Version . . .
. . .
Listener Log File /home/app/oracle/product/10.2/network/log/listener.log
Does anyone know why this is happening? I can select the table but
can't export it.
C:\>sqlplus myschema/myschema
SQL*Plus: Release 12.1.0.2.0 Production on Mon Aug 1 14:43:45 2016
Copyright (c) 1982, 2014, Oracle. All rights reserved.
Last Successful login time: Mon Aug 01 2016 14:42:51 -04:00
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics, and Real Application Testing opt
ions
SQL> select * from product;
ID NAME
---------- --------------------
1 sample_product_name
SQL> exit
Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64
bit Production
With the Partitioning, OLAP, Advanced Analytics, and Real Application Testing opt
ions
C:\>expdp myschema/myschema#oradev tables=product directory=DATA_PUMP_DIR dumpfi
le=expdp_myschema.dmp logfile=expdp_myschema.log
Export: Release 12.1.0.2.0 - Production on Mon Aug 1 14:44:16 2016
Copyright (c) 1982, 2014, Oracle and/or its affiliates. All rights reserved.
Connected to: Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit
Production
With the Partitioning, OLAP, Advanced Analytics, and Real Application Testing opt
ions
WARNING: Oracle Data Pump operations are not typically needed when connected to
the root or seed of a container database.
Starting "MYSCHEMA"."SYS_EXPORT_TABLE_01": myschema/********#oradev tables=prod
uct directory=DATA_PUMP_DIR dumpfile=expdp_myschema.dmp logfile=expdp_myschema.l
og
Estimate in progress using BLOCKS method...
Total estimation using BLOCKS method: 0 KB
Processing object type TABLE_EXPORT/TABLE/STATISTICS/MARKER
**ORA-39166: Object MYSCHEMA.PRODUCT was not found** or could not be exported or imp
orted.
ORA-31655: no data or metadata objects selected for job
Job "MYSCHEMA"."SYS_EXPORT_TABLE_01" completed with 2 error(s) at Mon Aug 1 14:4
4:18 2016 elapsed 0 00:00:01
Add parameter CONTENT=ALL at the end of your expdp command line,like this:
expdp myschema/myschema#oradev tables=product directory=DATA_PUMP_DIR dumpfi le=expdp_myschema.dmp logfile=expdp_myschema.log CONTENT=ALL
and execute it.
i have oracle11g desktop. For my project I create 3 databases via configuration assistant tools. Then I delete one of them
and after this I have the error: ora-12560.
By mistake both of my databases have the same pasword,
for example: when i want to connect one of these data bases with system user, i have one pasword and perhaps the databases dont know connect which one.
I start all services
set oracle_sid=orcl.
I run lsnrctl
tnsping check tansname.ora & my listener.ora
and I logon with sysdba#oracle_sid
but i have this error again
pleas help me
tnx
sounds like the database is not up. you probably restarted your machine and the instance is not set to autostart
C:\Documents and Settings\tkyte>sqlplus scott/tiger
SQL*Plus: Release 10.1.0.4.0 - Production on Thu Sep 6 15:43:55 2007
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.1.0.4.0 - Production
With the Partitioning, OLAP and Data Mining options
scott%ORA10GR1> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.1.0.4.0 - Production
With the Partitioning, OLAP and Data Mining options
C:\Documents and Settings\tkyte>net stop oracleserviceora10gr1
The OracleServiceORA10GR1 service is stopping.........
The OracleServiceORA10GR1 service was stopped successfully.
C:\Documents and Settings\tkyte>sqlplus scott/tiger
SQL*Plus: Release 10.1.0.4.0 - Production on Thu Sep 6 15:44:35 2007
Copyright (c) 1982, 2005, Oracle. All rights reserved.
ERROR:
ORA-12560: TNS:protocol adapter error
Enter user-name:
ERROR:
ORA-12560: TNS:protocol adapter error
Enter user-name:
ERROR:
ORA-12560: TNS:protocol adapter error
SP2-0157: unable to CONNECT to ORACLE after 3 attempts, exiting SQL*Plus
C:\Documents and Settings\tkyte>net start oracleserviceora10gr1
The OracleServiceORA10GR1 service is starting..........
The OracleServiceORA10GR1 service was started successfully.
C:\Documents and Settings\tkyte>sqlplus scott/tiger
SQL*Plus: Release 10.1.0.4.0 - Production on Thu Sep 6 15:45:12 2007
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.1.0.4.0 - Production
With the Partitioning, OLAP and Data Mining options
scott%ORA10GR1>
I have got the same error after delete a db (in the window enviroment) and I resolved as following
the first way:
C:> SET ORACLE_SID = SID NAME
the second way:
Use regedit locate to path: HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\KEY_HOME_NAME
update ORACLE_SID =
refer at: https://docs.oracle.com/database/121/ADMQS/GUID-EC18C4A6-3BA5-4C14-9D76-B0DD62FEFFF2.htm#ADMQS12369
My problem is after I started Oracle Listener succesfully, it will stop automatically after a few seconds.
cache1-> lsnrctl start
LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 20-MAY-2013 16:35:36
Copyright (c) 1991, 2009, Oracle. All rights reserved.
Starting /u01/app/oracle/product/11.2.0/db_1/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 11.2.0.1.0 - Production
System parameter file is /u01/app/oracle/product/11.2.0/db_1/network/admin/listener.ora
Log messages written to /u02/ora/diagnostic_dest/diag/tnslsnr/cache1/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521)))
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=127.0.0.1)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date 20-MAY-2013 16:35:36
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/11.2.0/db_1/network/admin/listener.ora
Listener Log File /u02/ora/diagnostic_dest/diag/tnslsnr/cache1/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521)))
Services Summary...
Service "ora" has 1 instance(s).
Instance "ora", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
during the mean time, the tnsping from other server is worked.
cache2-> tnsping cache1
TNS Ping Utility for Linux: Version 11.2.0.1.0 - Production on 20-MAY-2013 16:35:38
Copyright (c) 1997, 2009, Oracle. All rights reserved.
Used parameter files:
Used HOSTNAME adapter to resolve the alias
Attempting to contact (DESCRIPTION=(CONNECT_DATA=(SERVICE_NAME=))(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.2)(PORT=1521)))
OK (0 msec)
after a few seconds, I check it again, it stopped automatically:
cache1-> lsnrctl status
LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 20-MAY-2013 16:36:36
Copyright (c) 1991, 2009, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=127.0.0.1)(PORT=1521)))
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
TNS-00511: No listener
Linux Error: 111: Connection refused
and tnsping doesn't work.
cache2-> tnsping cache1
TNS Ping Utility for Linux: Version 11.2.0.1.0 - Production on 20-MAY-2013 16:36:37
Copyright (c) 1997, 2009, Oracle. All rights reserved.
Used parameter files:
Used HOSTNAME adapter to resolve the alias
Attempting to contact (DESCRIPTION=(CONNECT_DATA=(SERVICE_NAME=))(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.200.2)(PORT=1521)))
TNS-12541: TNS:no listener
the listener.ora:
/u01/app/oracle/product/11.2.0/db_1/network/admin/listener.ora
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = ora)
(GLOBAL_DBNAME = ora)
(ORACLE_HOME = /u01/app/oracle/product/11.2.0/db_1)
)
)
LISTENER =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))
)
ADR_BASE_LISTENER = /u02/ora/diagnostic_dest
Thanks
Faced simillar issue with oracle11gr2 in rhel 6.x...
Not sure if same issue ...check the log.xml file for trc log location in my case:
/u01/app/oracle/diag/tnslsnr/dbserver/listener/alert/log.xml
from above file we got link to following log file:
/u01/app/oracle/diag/tnslsnr/dbserver/listener/trace/listener.log
the above file, we checked and we were keep getting the following :
WARNING: Subscription for node down event still pending
13-FEB-2017 17:28:42 * (CONNECT_DATA=(CID=(PROGRAM=)(HOST=dbserver)(USER=oracle))(COMMAND=status)(ARGUMENTS=64)(SERVICE=LISTENER)(VERSION=186647040)) * status * 0
WARNING: Subscription for node down event still pending
After googling a little bit we found some info in "https://docs.oracle.com/cd/E11882_01/network.112/e10835/listener.htm#NETRF312"
we need to add the following at the end of listener.ora
/u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
SUBSCRIBE_FOR_NODE_DOWN_EVENT_LISTENER = off
I have the following problem with Oracle 11g TNSPING utility: fresh 11g client installation, ORACLE_HOME set up properly, TNS_ADMIN also set, msb files available in desired location, readable by the user that invokes TNSPING. Connection to the database works, sqlplus can be used to connect. TNSPING, however, fails badly. See attached log:
Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\USERNAME>set ORACLE_HOME=C:\Work\Software\Oracle\product\11.2.0\client_1
C:\Users\USERNAME>set TNS_ADMIN=%ORACLE_HOME%\network\admin
C:\Users\USERNAME>set NLS_LANG=ENGLISH_POLAND.EE8MSWIN1250
C:\Users\USERNAME>dir %TNS_ADMIN%\tnsnames.ora
Volume in drive C is XXX
Volume Serial Number is YYY
Directory of C:\Work\Software\Oracle\product\11.2.0\client_1\network\admin
2013-03-19 12:26 358 tnsnames.ora
1 File(s) 358 bytes
0 Dir(s) 59 082 616 832 bytes free
C:\Users\USERNAME>dir %ORACLE_HOME%\network\mesg\tns*.msb
Volume in drive C is XXX
Volume Serial Number is YYY
Directory of C:\Work\Software\Oracle\product\11.2.0\client_1\network\mesg
2010-03-31 07:01 53 248 tnspl.msb
2010-03-31 07:01 47 104 tnsus.msb
2 File(s) 100 352 bytes
0 Dir(s) 59 082 616 832 bytes free
C:\Users\USERNAME>sqlplus <USER>/<PASSWORD>#<DATABASE>
SQL*Plus: Release 11.2.0.1.0 Production on Tue Mar 19 14:36:34 2013
Copyright (c) 1982, 2010, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Release 11.2.0.2.0 - 64bit Production
SQL> exit
Disconnected from Oracle Database 11g Release 11.2.0.2.0 - 64bit Production
C:\Users\USERNAME>tnsping <DATABASE>
TNS Ping Utility for 32-bit Windows: Version 11.2.0.1.0 - Production on 19-MAR-2013 14:37:52
Copyright (c) 1997, 2010, Oracle. All rights reserved.
Message 3511 not found; No message file for product=NETWORK, facility=TNSMessage 3512 not found; No message file for product=NETWORK, facility=TNSMessage 3513 not found; No message file for product=NETWORK, facility=TNSMessage 3509 not found; No message file for product=NETWORK, facility=TNS
Please note: I had to replace all the user credentials, database name, etc., due to security considerations.
Can you help me, please, troubleshoot the issue? I have read all the other StackExchange topics related to TNSPING failure, but each of the solutions (set up ORACLE_HOME, reinstall, make sure registry points to proper home, check msb files) has failed me...
Thanks in advance!