Reputation: 1669
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
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?
Upvotes: 1
Views: 26909
Reputation: 11
Please follow below steps:
lsnrctl status
and check ‘Listener parameter file’ for path of tnsnames.oraHighlighted name is SID.
Upvotes: 0
Reputation: 31
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)))';
Upvotes: 3
Reputation: 1669
removed listener.ora file in the directory: [oracle-home]\product\11.2.0\dbhome_1\NETWORK\ADMIN after which it worked
Upvotes: 1