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
[oracle@DB-ORACLE-11G-RHEL6 admin]$

TNSPING ORCL

[oracle@DB-ORACLE-11G-RHEL6 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)
[oracle@DB-ORACLE-11G-RHEL6 admin]$
up vote 0 down vote accepted

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.

  • $ . oraenv ORACLE_SID = [oracle] ? orcl iam not sure where to add this or execute. can you please help – Sandhya Krishnan Oct 11 at 11:39
  • @SandhyaKrishnan The same place where you used tnsping. – Balazs Papp Oct 11 at 13:24
  • ORACLE_SID = [oracle]? is part of the script oraenv. You have to enter the correct ORACLE_SID value in order to set all of the necessary environment variables. The '.' at the beginning of the first line is not a mistake. It is synonymous with source. Oh ... to see all valid SID values, cat /etc/oratab. – Michael Kutz Oct 11 at 15:14

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.