?
Solved

oracle TNS error

Posted on 2007-10-01
7
Medium Priority
?
11,621 Views
Last Modified: 2013-12-19
HI,

These are my TNS files I have two database on the testserv
and I face the error when I am try to connect with the database
there is no listener   -- ora-12541:tns:no listener

I am waiting for you replay

bye



# LISTENER.ORA Network Configuration File: C:\oracle\ora92\network\admin\listener.ora
# Generated by Oracle configuration tools.

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS_LIST =
        (ADDRESS = (PROTOCOL = TCP)(HOST =  testserv)(PORT = 1521))
      )
    )
  )

    (SID_DESC =
      (GLOBAL_DBNAME = oratest)
     (ORACLE_HOME = C:\oracle\ora92)
      (SID_NAME = oratest)
    )

    (SID_DESC =
      (GLOBAL_DBNAME = db652)
      (ORACLE_HOME = C:\oracle\ora92)
      (SID_NAME = db652)
    )
  )
-----
# TNSNAMES.ORA Network Configuration File: C:\oracle\ora92\network\admin\tnsnames.ora
# Generated by Oracle configuration tools.
--------
ORATEST =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = TESTSERV)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = oratest)
    )
  )


db652=
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = TESTSERV)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = db652)
    )
  )
-------------
# SQLNET.ORA Network Configuration File: C:\oracle\ora92\network\admin\sqlnet.ora
# Generated by Oracle configuration tools.

SQLNET.AUTHENTICATION_SERVICES= (NTS)



0
Comment
Question by:patmoli
  • 4
  • 3
7 Comments
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 19994073
that is the configuration, now, which listener processes are started on the server?
run this from the command line:

lsnrctl status
0
 
LVL 2

Author Comment

by:patmoli
ID: 19994238
Hi angelIII:
I am connect through command prompt with listener and this command

LSNRCTL> status
TNS-01150: The address of the specified listener name is incorrect
 NL-00303: syntax error in NV string
LSNRCTL>
0
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 19994280
that explains why you get "no listener", as the listener fails to parse the listener.ora, hence is not started.
http://www.error-code.org.uk/view.asp?e=ORACLE-TNS-01150

now, to solve the TNS-01150, we have to look carefully at your listener.ora file, here a sample file:
http://www.mike-devlin.com/oracle/listener_ora.htm

and in fact, simply, you miss 2 lines:
 SID_LIST_LISTENER =
  (SID_LIST =

before the second part of the file

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS_LIST =
        (ADDRESS = (PROTOCOL = TCP)(HOST =  testserv)(PORT = 1521))
      )
    )
  )

 SID_LIST_LISTENER =
  (SID_LIST =
   (SID_DESC =
      (GLOBAL_DBNAME = oratest)
     (ORACLE_HOME = C:\oracle\ora92)
      (SID_NAME = oratest)
    )
    (SID_DESC =
      (GLOBAL_DBNAME = db652)
      (ORACLE_HOME = C:\oracle\ora92)
      (SID_NAME = db652)
    )
  )

save that modified listener.ora, and issue the following 2 commands:
lsnrctl stop
lsnrctl start

the stop will raise some errors, as the listener is not started, actually, so is just to ensure it stops cleanly anyhow.
once that is done, try to issue:

tnsping ORATEST
or
tnsping db652

should work better, now, and hence, the connection should work also.

0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 2

Author Comment

by:patmoli
ID: 19994376
Hi,

When I am use stop and start command the result is

LSNRCTL> stop
TNS-01150: The address of the specified listener name is incorrect

 NL-00303: syntax error in NV string
LSNRCTL>
LSNRCTL> start
Starting tnslsnr: please wait...

Service OracleOraHome92TNSListener already running.
TNS-12560: TNS:protocol adapter error
LSNRCTL>

------
and user the tnsping command in command prompt  result is


C:\>tnsping ORATEST

TNS Ping Utility for 32-bit Windows: Version 9.2.0.1.0 - Production on 01-OCT-20
07 14:25:28

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

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


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)
(HOST = TESTSERV)(PORT = 1521))) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_N
AME = oratest)))
OK (10 msec)

C:\>tnsping db652

TNS Ping Utility for 32-bit Windows: Version 9.2.0.1.0 - Production on 01-OCT-20
07 14:25:59

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

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


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)
(HOST = TESTSERV)(PORT = 1521))) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_N
AME = db652)))
OK (20 msec)

C:\>



bye
0
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 19994400
what about using
lsnrctl reload

i assume you saved/modified the file as shown?
0
 
LVL 2

Author Comment

by:patmoli
ID: 19994426
hi
 
Yes I save the fiel as you shown
but i am not use the lsnrctl reload command
I just stop and start listener
but now my listener is working and i am able to connect with both database


by
0
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 2000 total points
ID: 19994448
glad I could help
good night (I go to bed now)
0

Featured Post

Configuration Guide and Best Practices

Read the guide to learn how to orchestrate Data ONTAP, create application-consistent backups and enable fast recovery from NetApp storage snapshots. Version 9.5 also contains performance and scalability enhancements to meet the needs of the largest enterprise environments.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
When it comes to protecting Oracle Database servers and systems, there are a ton of myths out there. Here are the most common.
This video shows how to Export data from an Oracle database using the Datapump Export Utility.  The corresponding Datapump Import utility is also discussed and demonstrated.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Suggested Courses

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question