Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

ORA-12505, TNS:listener does not currently know of SID given in connect des

538177Oct 8 2006 — edited Oct 14 2006
Hi, i'm new with Oracle. I'm using JDeveloper 10g, when i try to create a database connection with the hr/hr user i get this message:

Listener refused the connection with the following error:
ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
The Connection descriptor used by the client was:
localhost:1521:ORCL


Please, if somebpdy could give me a tip, i repeat, i'm new with Oracle. Thanks

Comments

RPuttagunta
Is the oracle service on your computer?

Can you do this from your command line:

tnsping ORCL;

and paste what you get.

Rahul.

Message was edited by:
RPuttagunta
Eduardo Legatti
Hi,

Check to make sure that the SID is correct. The SIDs that are currently registered with the listener can be obtained by typing:

LSNRCTL SERVICES on the Server

These SIDs correspond to SID_NAMEs in TNSNAMES.ORA or DB_NAME in the initialization file.

Cheers
538177
Rahul: when i type what you told me i get this:

C:\Documents and Settings\Alejandro>tnsping ORCL

TNS Ping Utility for 32-bit Windows: Version 9.2.0.1.0 - Production on 10-OCT-20
06 01:03:53

Copyright (c) 1997 Oracle Corporation. All rights reserved.

Used parameter files:
C:\oracle\ora91\network\admin\sqlnet.ora

TNS-03505: Failed to resolve name

I don't know what this means, this is the TNSNames file:


GLOBAL =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = MARROC)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = Global)
(SRVR = DEDICATED)
)
)

Rahul why there is not a SID specified?? And why I can connect to the DB with Toad???
Thanks for your help.
Mohammed Taj
just post

lnsrctl services
or
tnsnames.ora file content.
thanx
RPuttagunta
Rahul why there is not a SID specified??
The sid is specified but, is called Service_name from now on (I think from 9i, guys, correct me if I am wrong) - here, the service_name in your case is 'Global' (SERVICE_NAME = Global)

Run this and let us know what you get:

C:\Documents and Settings\Alejandro>lsnrctl services



and also


C:\Documents and Settings\Alejandro>tnsping Global
517402
TNS-12505 TNS:listener could not resolve SID given in connect descriptor
Cause: The SID in CONNECT_DATA was not found in the listener's tables.
Action: Check to make sure that the SID specified is correct. The SIDs that are
currently registered with the listener can be obtained by typing "LSNRCTL
SERVICES listener_name". These SIDs correspond to SID_NAMEs in
TNSNAMES.ORA, or DB_NAMES in the INIT.ORA file.
538177
C:\Documents and Settings\Alejandro>lsnrctl services

LSNRCTL for 32-bit Windows: Version 9.2.0.1.0 - Production on 10-OCT-2006 19:44:
21

Copyright (c) 1991, 2002, Oracle Corporation. All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))
Services Summary...
Service "Global" has 2 instance(s).
Instance "GlobalId", status UNKNOWN, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:0 refused:0
LOCAL SERVER
Instance "GlobalId", status READY, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:2 refused:0 state:ready
LOCAL SERVER
Service "GlobalIdXDB" has 1 instance(s).
Instance "GlobalId", status READY, has 1 handler(s) for this service...
Handler(s):
"D000" established:33 refused:0 current:33 max:1002 state:ready
DISPATCHER <machine: MARROC, pid: 3824>
(ADDRESS=(PROTOCOL=tcp)(HOST=marroc)(PORT=1038))
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:0 refused:0
LOCAL SERVER
The command completed successfully



C:\Documents and Settings\Alejandro>tnsping Global

TNS Ping Utility for 32-bit Windows: Version 9.2.0.1.0 - Production on 10-OCT-20
06 19:46:31

Copyright (c) 1997 Oracle Corporation. All rights reserved.

Used parameter files:
C:\oracle\ora91\network\admin\sqlnet.ora


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)
(HOST = MARROC)(PORT = 1521))) (CONNECT_DATA = (SERVICE_NAME = Global) (SRVR = D
EDICATED)))
OK (30 msec)

Any idea?
522573
By your last post seems the connection to database good, because 'TNSPING' is returning 30 msec. But if you can't connect from JDeveloper 10g I suppose this is due to JDeveloper is using the SID term in place of SERVICE_NAME. Can you edit your "TNSNAMES.ORA" and change SERVICE_NAME by SID and try to connect from JDeveloper, without restarting listener (it's not necessary)?
538177
I changed SERVICE_NAME by SID and i still can't connect either with JDeveloper or TOAD. So i changed again to SERVICE_NAME and i can connect to the db only with TOAD. Thanks anyway.
477720
Check the global database name and replace in sid
or try this
global =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = MARROC)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = Global)
)
)
Mohammed Taj
check ur tns_admin entry is correctly set.
or set again tns_admin variable and try again.
1 - 11
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Nov 11 2006
Added on Oct 8 2006
11 comments
730,726 views