Unable to connect to oracle database. Getting ORA12505 error

by Sandhya Krishnan   Last Updated October 11, 2018 12:06 PM

I am newbie to ORCALE

I am trying to connect to oracle server and i am getting this error. This is was working fine before but now i am facing this issue. Need help

An error was encountered performing the requested operation:

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

this is my listener.ora file

SID_LIST_LISTNITBSCAT =
  (SID_LIST =
    (SID_DESC =
      (GLOBAL_DBNAME = ITBSCAT)
      (ORACLE_HOME = /u01/app/oracle/product/11.2.0/dbhome_1)
      (SID_NAME = ITBSCAT)
    )
  )

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
    )
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = DB-ORACLE-11G-RHEL6)(PORT = 1521))
    )
  )

ADR_BASE_LISTENER = /u01/app/oracle

LISTNITBSCAT =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = DB-ORACLE-11G-RHEL6)(PORT = 1522))
  )

ADR_BASE_LISTNITBSCAT = /u01/app/oracle

This is my tnsnames.ora file which is my env

(DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = DB-ORACLE-11G-RHEL6)(PORT = 1522))
    )
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = ITBSCAT)
    )
  )

DMSORCL =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 10.10.2.89)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = orcl)
    )
  )

ARCHDBGG =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 10.10.5.16)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = archdb)
    )
  )

ORCL =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = DB-ORACLE-11G-RHEL6)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = orcl)
    )
  )

Listener status:

Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date                11-OCT-2018 18:26:36
Uptime                    0 days 2 hr. 8 min. 44 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Listener Log File         /u01/app/oracle/diag/tnslsnr/DB-ORACLE-11G-RHEL6/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=DB-ORACLE-11G-RHEL6)(PORT=1521)))
The listener supports no services
The command completed successfully
[[email protected] admin]$

TNSPING ORCL

[[email protected] admin]$ tnsping orcl

TNS Ping Utility for Linux: Version 11.2.0.1.0 - Production on
11-OCT-2018 21:32:30

Copyright (c) 1997, 2009, Oracle.  All rights reserved.

Used parameter files:
/u01/app/oracle/product/11.2.0/dbhome_1/network/admin/sqlnet.ora

Used TNSNAMES adapter to resolve the alias Attempting to contact
(DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST =
DB-ORACLE-11G-RHEL6)(PORT = 1521))) (CONNECT_DATA = (SERVER =
DEDICATED) (SERVICE_NAME = orcl))) OK (0 msec)
[[email protected] admin]$


Answers 1


This: The listener supports no services.

Your database is not started, or it is registered into a different listener.

Assuming you have the simplest default configuration, just start your database with oracle user:

$ . oraenv
ORACLE_SID = [oracle] ? orcl
...
$ sqlplus / as sysdba
SQL> startup

Do not forget case sensitivity when providing the value for ORACLE_SID.

Balazs Papp
Balazs Papp
October 11, 2018 11:20 AM

Related Questions


Updated October 28, 2018 07:06 AM

Updated July 27, 2016 08:02 AM

Updated February 29, 2016 01:02 AM

Updated November 09, 2016 08:02 AM

Updated March 07, 2017 21:06 PM