TNS Listener issue
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 10 of 12

Thread: TNS Listener issue

Hybrid View

  1. #1
    Join Date
    Feb 2010
    Posts
    36

    TNS Listener issue

    I have two databases on one machine. I can login to only one db at a time. If I try to connect other db it gives me the error:

    TNS listener currently does not know service requested in connect descriptor.

    Even if I set the oracle_sid "ORADB", it get connected to "ORADEV". And if I specify the Connect identifiet it gives me TNS error.

    Kindly assist.

    Regards,
    Mayura

  2. #2
    Join Date
    Mar 2007
    Location
    Ft. Lauderdale, FL
    Posts
    3,554
    How many listeners? one per instance?

    Either way, issue is most likely related to an issue on tnsnames.ora file.

    For future reference - for better/faster help copy/paste session log as well as printout of related files.
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.

  3. #3
    Join Date
    Feb 2010
    Posts
    36
    The Db name mentioned above were just examples. The actual db names are in tns file below. The details as as below:

    LSNRCTL> status
    Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
    STATUS of the LISTENER
    ------------------------
    Alias LISTENER_GISDEV
    Version TNSLSNR for 64-bit Windows: Version 11.2.0.1.0 - Production
    Start Date 20-JAN-2011 10:16:27
    Uptime 4 days 5 hr. 5 min. 37 sec
    Trace Level off
    Security ON: Local OS Authentication
    SNMP OFF
    Listener Parameter File C:\ORA\dbadmin\product\11.2.0\GISDEV\NETWORK\ADMIN\listener.ora
    Listener Log File c:\ora\dbadmin\diag\tnslsnr\PDFPGISORDEV\listener_gisdev\alert\log.xml
    Listening Endpoints Summary...
    (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=PDFPGISORDEV.PADOTGIS.state.pa.us)(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 "giszgg" has 1 instance(s).
    Instance "gisdev", status READY, has 2 handler(s) for this service...
    Service "orad2" has 1 instance(s).
    Instance "orad2", status BLOCKED, has 1 handler(s) for this service...
    The command completed successfully


    ===============================================================================
    TNSNAMES.ORA

    ORAD2 =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 164.156.155.129)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = SHARED)
    (SERVICE_NAME = orad2)
    )
    )


    giszgg =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 164.156.155.134)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = SHARED)
    (SERVICE_NAME = giszgg)
    )
    )

    gisdev =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 164.156.155.134)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = SHARED)
    (SERVICE_NAME = gisdev)
    )
    )


    Thanks...

  4. #4
    Join Date
    Mar 2006
    Location
    Charlotte, NC
    Posts
    865
    Quote Originally Posted by mayura.ch View Post
    Service "orad2" has 1 instance(s).
    Instance "orad2", status BLOCKED, has 1 handler(s) for this service...
    The command completed successfully

    check out why the status of the above instance is blocked.

    Thanks,
    Vijay Tummala

    Try hard to get what you like OR you will be forced to like what you get.

  5. #5
    Join Date
    Feb 2010
    Posts
    36
    But orad2 is on different server and gisdev,giszgg are on same server. And I am trying to keep gisdev and giszgg UP at the same time..

    Mean while I will check the reason being orad2 blocked.

    Thanks...

  6. #6
    Join Date
    Feb 2010
    Posts
    36
    Now I do not have the status Blocked.

    Can anyone let me know why I am not able to connect both the servers at a time?

    The issue was I have created giszgg cloned db from orad2. GISZGG and GISDEV are on same server. gisdev was up and running when I did clone and now all the trace files and alert log is getting created by gisdev suffix. Help me out to get solution on this so that GISZGG and GISDEV can run independantly?

  7. #7
    Join Date
    Apr 2008
    Location
    Bangalore
    Posts
    96
    according to me you cannot have two listeners listening to same port at a time,so i would suggest to separate out the listener ,create a new listener.ora assign new port(say 1529) set local_listener parameter.You should be all set

  8. #8
    Join Date
    Feb 2011
    Location
    Norwich, UK
    Posts
    5
    In our listener.ora file, in the SID_LIST_LISTENER section we have multiple databases specified in the SID_LIST. For example:

    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME = PLSExtProc)
    (ORACLE_HOME = /apps/oracle/10gR2)
    (PROGRAM = extproc)
    )
    (SID_DESC =
    (GLOBAL_DBNAME = db1.domain.co.uk)
    (ORACLE_HOME = /apps/oracle/10gR2)
    (SID_NAME = db1)
    )
    (SID_DESC =
    (GLOBAL_DBNAME = db2.domain.co.k)
    (ORACLE_HOME = /apps/oracle/10gR2)
    (SID_NAME = db2)
    )
    )

    This does mean that we only have one listener for all our DBs, if you want one listener per DB then I guess you would need similiar to above but with something like SID_LIST_LISTENER1 and then SID_LIST_LISTENER2. Each with their single SID_LIST and SID_DESC section.

    Is that of any help?

    With the tnsnames.ora file we have our SIDs listed, all with the same port.

  9. #9
    Join Date
    Feb 2010
    Posts
    36
    Hi All,

    Thanks for reply.

    1) I can have two listeners on same port that 1521 (Verified after testing).
    Both the listener are up and running.

    2) The issue was as below and it's strange:
    Windows 2008R2 has new interface like commandprompt and it is windows power shell. I was setting ORACLE_SID first and was logging into the database. But "ENVIRNMENT CANNOT BE SET IN THIS WINDOWS POWER SHELL". Then I did it from normal windows command prompt and it could set the env veriables to logg into the proper db.

    Thanks and regards,
    Mayura

  10. #10
    Join Date
    Feb 2011
    Location
    Norwich, UK
    Posts
    5
    Hi Mayura,

    Glad you're sorted now.

    1) Is what I thought.

    2) Interesting issue, haven't come across that as our DBs are on Sun/Solaris platform.

    Thanks for posting your findings, hopefully it'll be useful if someone has the same problem!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width