Forum Stats

  • 3,874,814 Users
  • 2,266,777 Discussions
  • 7,911,968 Comments

Discussions

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

1012869
1012869 Member Posts: 9
edited Mar 11, 2014 8:00AM in General Database Discussions

HI,

Currently iam facing this issue on my local (weblogic) server. Am not able to run any application due to this.

Its says

ce has property needsSeparateUserInfo set true, and property database set non-null.  The value for property database  will not be passed to DriverManager.getConnection unless it is  explicitly encoded as part of

  ---     CONTAINER:atg.repository.RepositoryException; SOURCE:java.sql.SQLException: atg.service.resourcepool.ResourcePoolException: java.sql.SQLException: Listener refused the connection with the following erro

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

          at atg.adapter.gsa.GSAItemDescriptor.executeQuery(GSAItemDescriptor.java:8347)

          at atg.adapter.gsa.GSAView.executeUncachedQuery(GSAView.java:362)

          at atg.repository.query.QueryCache.executeUncachedQuery(QueryCache.java:719)

          at atg.repository.query.QueryCache.populateEntry(QueryCache.java:1011)

          at atg.repository.query.QueryCache.executeCachedCountQuery(QueryCache.java:547)

          at atg.adapter.gsa.GSAView.executeCachedCountQuery(GSAView.java:800)

          at atg.adapter.gsa.GSAView.executeCountQuery(GSAView.java:688)

          at atg.adapter.gsa.GSAView.executeCountQuery(GSAView.java:666)

          at atg.multisite.SiteManager.getSiteCount(SiteManager.java:1049)

          at atg.multisite.session.MultisiteComponentSessionManager.hasSites(MultisiteComponentSessionManager.java:352)

          at atg.multisite.session.MultisiteComponentSessionManager.createSessionNameContext(MultisiteComponentSessionManager.java:206)

          at atg.servlet.NameContextManager.getSessionNameContext(NameContextManager.java:199)

          at atg.servlet.ServletUtil.getSessionNameContext(ServletUtil.java:825)

          at atg.servlet.pipeline.HeadPipelineServlet.service(HeadPipelineServlet.java:874)

          at atg.servlet.pipeline.PipelineableServletImpl.service(PipelineableServletImpl.java:272)

          at atg.filter.dspjsp.PageFilter.innerDoFilter(PageFilter.java:348)

          at atg.filter.dspjsp.PageFilter.doFilter(PageFilter.java:206)

          at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)

          at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3730)

          at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3696)

          at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)

          at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)

          at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2273)

          at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2179)

          at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1490)

          at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)

          at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)

  Caused by :java.sql.SQLException: atg.service.resourcepool.ResourcePoolException: java.sql.SQLException: Listener refused the connection with the following error:

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

----------------------------------------------------------------------------------------------------------------------------------------

     

I checked with lisener status. its absolutely fine,

FYI

C:\Users\ADMIN>lsnrctl

LSNRCTL for 64-bit Windows: Version 11.2.0.1.0 - Production on 06-MAR-2014 18:25:45

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

Welcome to LSNRCTL, type "help" for information.

----------------------------------------------------------------------------------------------------------------------------------------

LSNRCTL> status

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=ADMINIB-K09AMO5.in.ibm.com)(PORT=1521)))

STATUS of the LISTENER

------------------------

Alias                     LISTENER

Version                   TNSLSNR for 64-bit Windows: Version 11.2.0.1.0 - Production

Start Date                06-MAR-2014 13:47:03

Uptime                    0 days 4 hr. 39 min. 29 sec

Trace Level               off

Security                  ON: Local OS Authentication

SNMP                      OFF

Listener Parameter File   C:\oracle11G\product\11.2.0\dbhome_1\network\admin\listener.ora

Listener Log File         c:\oracle11g\diag\tnslsnr\ADMINIB-K09AMO5\listener\alert\log.xml

Listening Endpoints Summary...

  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ADMINIB-K09AMO5)(PORT=1521)))

  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1521ipc)))

Services Summary...

Service "CLRExtProc" has 1 instance(s).

  Instance "CLRExtProc", status UNKNOWN, has 1 handler(s) for this service...

Service "ORCLXDB" has 1 instance(s).

  Instance "orcl", status READY, has 1 handler(s) for this service...

Service "orcl" has 1 instance(s).

  Instance "orcl", status READY, has 1 handler(s) for this service...

The command completed successfully



---------------------------------------------------------------------------------------------------------------------------------------------------

And sqldeveloper is working absolutely fine. iam able to create, update, insert data's

---------------------------------------------------------------------------------------------------------------------------------------------------

i just pinged lsnrctl in command prompt. I got below error

C:\Users\ADMIN> tnsping lsnrctl

TNS Ping Utility for 64-bit Windows: Version 11.2.0.1.0 - Production on 06-MAR-2014 18:29:39

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

Sqlnet.ora file :

# This file is actually generated by netca. But if customers choose to

# install "Software Only", this file wont exist and without the native

# authentication, they will not be able to connect to the database on NT.

SQLNET.AUTHENTICATION_SERVICES = (NTS)

----------------------------------------------------------------------------------------------------------------------------------------------------

tnsnames.ora



# tnsnames.ora Network Configuration File: C:\oracle11G\product\11.2.0\dbhome_1\network\admin\tnsnames.ora

# Generated by Oracle configuration tools.

ORACLR_CONNECTION_DATA =

  (DESCRIPTION =

    (ADDRESS_LIST =

      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))

    )

    (CONNECT_DATA =

      (SID = CLRExtProc)

      (PRESENTATION = RO)

    )

  )

ORCL =

  (DESCRIPTION =

    (ADDRESS = (PROTOCOL = TCP)(HOST = ADMINIB-K09AMO5)(PORT = 1521))

    (CONNECT_DATA =

      (SERVER = DEDICATED)

      (SERVICE_NAME = ORCL)

    )

  )

-----------------------------------------------------------------------------------------------------------------------------------------------------

listner.ora




# listener.ora Network Configuration File: C:\oracle11G\product\11.2.0\dbhome_1\network\admin\listener.ora

# Generated by Oracle configuration tools.

SID_LIST_LISTENER =

  (SID_LIST =

    (SID_DESC =

      (SID_NAME = CLRExtProc)

      (ORACLE_HOME = C:\oracle11G\product\11.2.0\dbhome_1)

      (PROGRAM = extproc)

      (ENVS = "EXTPROC_DLLS=ONLY:C:\oracle11G\product\11.2.0\dbhome_1\bin\oraclr11.dll")

    )

  )

LISTENER =

  (DESCRIPTION_LIST =

    (DESCRIPTION =

      (ADDRESS = (PROTOCOL = TCP)(HOST = ADMINIB-K09AMO5)(PORT = 1521))

      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))

    )

  )

ADR_BASE_LISTENER = C:\oracle11G

--------------------------------------------------------------------------------------------------------------------------------------------------

I have tested the connection pool. its working fine too.. Can anyone please help me on this issue.

Thanks

Muraliraj S

Tagged:
«1

Answers

  • onkar.nath
    onkar.nath Member Posts: 733 Silver Badge

    open net manager and expand listener node and then add the listening service and database server and save the configuration file. After that it should be fine.

    Onkar

  • carajandb
    carajandb Member Posts: 260 Bronze Badge

    can you please check the following:

    tnsping ORCL

    sqlplus system/[email protected]

    (the correct password is not necessary as you will receive the error message invalid password if you can connect)

  • AjinkyaSH
    AjinkyaSH Member Posts: 23

    This might happen due to multiple Oracle Homes, how many Oracle home you have ??

    Ajinkya

  • Osama_Mustafa
    Osama_Mustafa Member Posts: 6,086 Gold Trophy

    Check http://support.oracle.com document

    SERVICE_NAME Parameter - Resolving The ORA-12514 Error (Doc ID 77640.1)

    TROUBLESHOOTING GUIDE: ORA-12154 & TNS-12154 TNS:could not resolve service name (Doc ID 114085.1)

  • EdStevens
    EdStevens Member Posts: 28,778 Gold Crown
    1012869 wrote:
    <snip> 
    i just pinged lsnrctl in command prompt. I got below error 
    
    C:\Users\ADMIN> tnsping lsnrctl
    
    TNS Ping Utility for 64-bit Windows: Version 11.2.0.1.0 - Production on 06-MAR-2014 18:29:39
    
    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
    

    Why are doing a tnsping on 'lsnrctl'?  Of course you got a tns-03505 on that.  You do not have (and have no reason to have) an entry named 'lsnrctl' in your tnsnames.ora file.


    The only thing tnsping does is resolve the command line argument (in your case, 'lsnrctl') by looking it up in tnsnames, then sending a ping to the specified host/ip and port.  If there is a listener at that ip and port, an acknowledgement will be returned.  That is all.  So tnsping is good for confirming what a real client would try to do with the same connect information.  It says nothing about the state of the database itself, nor of the listener's knowledge of the database.


    What we do know from your tnsping attempt (and the ONLY thing we know from it) is that on that machine, with the current ORACLE_HOME setting (whatever it is), that tns is looking in c:\oracle11g\product\11.2.0\dbhome_1\network\admin for its sqlnet.ora and tnsnames.ora files, and that the tnsnames.ora at that location does not have an entry named 'lsnrctl'. 


  • 1012869
    1012869 Member Posts: 9

    Hi

    I checked it, there is only one oracle home available in System environment, Is there anything need to be consider about "Path" variables,  it looks like. it is more than 1500 words,

    Thanks

    Muraliraj S

  • EdStevens
    EdStevens Member Posts: 28,778 Gold Crown

    ora-12505 is first cousin to ora-12514

    Please see: http://edstevensdba.wordpress.com/2011/03/19/ora-12514/  (ora-12514  Listener does not know of requested service )

    And keep in mind that when looking at the client side of the equation, your WebSphere machine is the client.

  • 1012869
    1012869 Member Posts: 9

    Hi,

    Yes you are right there is no lsnrctl in tnsnames.ora, sqlnet.ora , It is pointing to the folder as you mentioned,. Can you please help me out of this issue.

    I have just pinged and tested the system environment variables

    C:\Users\ADMIN>set | grep -i ora

    ORACLE_BASE=C:\oracle11G

    ORACLE_HOME=c:\oracle11g\product\11.2.0\dbhome_1

    Path=C:\oracle11G\product\11.2.0\dbhome_1\bin;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\ThinkPad\Bluetooth Software\;C:\Program Files\ThinkPad\Bluetooth Software\syswow64;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files (x86)\Lenovo\Access Connections\;C:\Program Files (x86)\Personal Communications\;C:\Program Files (x86)\Trace Facility\;C

    tel\WirelessCommon\

    ----------------------------------------------------------------------------------------------------------------------------------

    and also i tried to ping below things

    C:\Users\ADMIN>tnsping orcl

    TNS Ping Utility for 64-bit Windows: Version 11.2.0.1.0 - Production on 07-MAR-2014 18:02:50

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

    Used parameter files:

    c:\oracle11g\product\11.2.0\dbhome_1\network\admin\sqlnet.ora

    Used TNSNAMES adapter to resolve the alias

    Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = ADMINIB-K09AMO5)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = ORCL)))

    OK (0 msec)

    -----------------------------------------------------------------------------------------------------------------------------------

    Can you tell me what i need to do further for resolving this issue.

  • 1012869
    1012869 Member Posts: 9

    HI

    This is what i get when i pinged tnsping orcl

    --------------------------------------------------------------------------------------------------------------------------------

    C:\Users\ADMIN>tnsping orcl

    TNS Ping Utility for 64-bit Windows: Version 11.2.0.1.0 - Production on 07-MAR-2014 18:02:50

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

    Used parameter files:

    c:\oracle11g\product\11.2.0\dbhome_1\network\admin\sqlnet.ora

    Used TNSNAMES adapter to resolve the alias

    Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = ADMINIB-K09AMO5.in.ibm.com)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = ORCL)))

    OK (0 msec)

    Thanks,

    Muraliraj S

  • 1012869
    1012869 Member Posts: 9

    Hi,

    Can you give me the steps for doing that. Am not aware of how to create the service or so. if you could help me to get through it.

    Regards,

    Muraliraj S

This discussion has been closed.