1

i have two Oracle 12c instances. currently both are shutdown. when I try to connect with sqlplus / as sysdba it says tns protocol adapter error contents of tnsnames.ora are

DB12102 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(CONNECT_DATA =
  (SERVER = DEDICATED)
  (SERVICE_NAME = DB12102)
 )
 )

LISTENER_DB12102 =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))

ORADB =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(CONNECT_DATA =
  (SERVER = DEDICATED)
  (SERVICE_NAME = oradb.example.com)
   )
   )

 LISTENER_ORCL =
 (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1539))

contents of listener.ora are

LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
  (ADDRESS = (PROTOCOL = TCP)(HOST = localhost )(PORT = 1521))
)

)

Output of lsnrctl status is

TNSLSNR for Solaris: Version 12.1.0.2.0 - Production
System parameter file is /u01/app/oracle/product/12.1.0.2/db_1/network   /admin/listener.ora
Log messages written to /u01/app/oracle/diag/tnslsnr/id1presasd0100/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521)))
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)  (PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Solaris: Version 12.1.0.2.0 -Production
Start Date                21-OCT-2015 02:44:00
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/12.1.0.2/db_1/network/admin/listener.ora
Listener Log File         /u01/app/oracle/diag/tnslsnr/id1presasd0100/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521)))
The listener supports no services
The command completed successfully

still when i try to connect with sqlplus

$ sqlplus / as sysdba

SQL*Plus: Release 12.1.0.2.0 Production on Wed Oct 21 02:45:36 2015
 Copyright (c) 1982, 2014, Oracle.  All rights reserved.
 ERROR:
 ORA-12560: TNS:protocol adapter error

Any help on this ?? I repeat none of the instances are running currently. i am trying SQLplus on same machine as database.

  • also i have setup correct values for ORACLE_HOME and ORACLE_SID – Amit Jaiswal Oct 21 '15 at 9:33
  • alter system register and register the instance with listener – tesla747 Oct 21 '15 at 9:52
  • I am not able to login to the database at all ! – Amit Jaiswal Oct 21 '15 at 11:12
  • Sorry, I removed my answer, as I did not pay attention to the operating system. – Balazs Papp Oct 21 '15 at 11:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.