1
votes

I installed oracle 11g successfully and was able to login with SQL plus. When I tried making a connection with the same username and password via SQL developer however I'm getting the ora-12505 error

error

Printout of my tnsname.ora:

# tnsnames.ora Network Configuration File: C:\Oracle11g\product\11.2.0\dbhome_1\network\admin\tnsnames.ora
# Generated by Oracle configuration tools.

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

ORACLR_CONNECTION_DATA =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
    )
    (CONNECT_DATA =
      (SID = CLRExtProc)
      (PRESENTATION = RO)
    )
  )

When I execute the tnspint orcl; I get:

C:\Windows\system32>tnsping ORCL;

TNS Ping Utility for 32-bit Windows: Version 11.2.0.1.0 - Production on 22-JUL-2013 00:52:10

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

Used parameter files:
C:\Oracle11g\product\11.2.0\dbhome_1\network\admin\sqlnet.ora

TNS-03505: Failed to resolve name

C:\Windows\system32>

Could anyone assist in solving this problem and getting sql developer connected with my oracle database?

3

3 Answers

3
votes

Just Run This command in RUN SQL Command after connecting to username and password credentials.

command:

alter system set local_listener='(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521)))';
1
votes

removed listener.ora file in the directory: [oracle-home]\product\11.2.0\dbhome_1\NETWORK\ADMIN after which it worked

0
votes

Please follow below steps:

  • Go to Start > cmd
  • Type lsnrctl status and check ‘Listener parameter file’ for path of tnsnames.ora
  • Go to the location, open file tnsnames.ora & check if SID is present. If not create one. sample file tnsnames.ora

Highlighted name is SID.

  • If the service is down go to: Start > All Programs > Oracle-HOME_NAME > Configuration and Migration Tools > Administration Assistant for Windows

sample screen print of admin tool

  • Note: Here my SID is ‘ORCL’ then I checked in tnsnames.ora file
  • Right click and click ‘stop service’
  • Again Right click and click ‘start service’
  • For more info: start/stop oracle services
  • If you face problems for starting up please follow steps in: ORA-00600