2 Replies Latest reply on Apr 15, 2013 5:16 PM by Chandrakaanth Ramamurthy

    ORA-12505, TNS:listener and ORA-12514: TNS:listener

    Santhosh T
      Hi All,

      Am not able to connect to the database through the SQL Developer. When i am trying to connect the error was as below.

      "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"

      My Database version : Oracle Database 10g Express Edition
      O/S : Windows 7, 32 bit

      I have tried to restart the machine and also the OraclceServiceXE service in the services menu, but of no use.

      And when i am trying to connect it from the sqlplus prompt...the error was

      "C:\>sqlplus santhu/abcd@xe

      SQL*Plus: Release - Production on Sun Apr 7 14:30:21 2013

      Copyright (c) 1982, 2005, Oracle. All rights reserved.

      ORA-12514: TNS:listener does not currently know of service requested in connect

      Could you please help me where to check for the resolution.

        • 1. Re: ORA-12505, TNS:listener and ORA-12514: TNS:listener
          Jim Smith
          If you installed Express edition, your sid or service should be XE, so this error implies the database isn't up.

          Open a command window and type
          lsnrctl status.   
          This should show what services are running (if any).

          tnsping xe
          This will show the connection definition being used. It is what you would expect? Are host, port and sid or service correct?
          Do they match what you have entered for your connection definition in SQL Developer?

          If the definitions seem OK, try using the start menu options to stop and start the XE database and try connectiing again.
          • 2. Re: ORA-12505, TNS:listener and ORA-12514: TNS:listener
            Chandrakaanth Ramamurthy
            Just try following the below steps

            1. Check if the ORACLE_HOME and TNS_ADMIN variables are set properly(any change would require a restart).

            2. Check if the correct driver is installed.

            3. tnsping any SID and see if there is a response.

            4. Check if the file TNSNAMES.ORA and SQLNET.ORA are in the correct location with the correct entries

            This should resolve the issue