Saturday, 10 March 2012

ORA- 12541 TNS listener issue

Hi

this is the most frequent issue that i encounter whenever i start cognos on my pc.So below is the steps to resolve it

1)TNS Listener should start before any other service like oracle database.
2)When oracle database comes up the listener listens to it and attaches .So listener should be on first

If you are not able to start listener from the services.The go to oracle in start up menu and click on configuration and migration and click on net configuration assistant.and configure your listener

If you want to check if the listener is working ping ORCL or the TNSname in you tnsnames.ora file this will make sure that your Ip address given in the tnsnames files is correct.

Recently my ip add got changed and the tnsname file had the old address

Go to command prompt and type ipconfig to get your ip address

One of the things you can do to check if the listener is listening to your tnsnames is type in

tnsping orcl

where orcl is your tnsname

Below is a post which tells about tnsping ,Ping how they can be used to solve your database connection problems

http://www.oracleutilities.com/OSUtil/ping.html


Belos is a very useful command to find the address of listener and its status.In My case my ip had changed and my tnsnames file still had the old ip.So when i used lsnrctl stat command i realised that the ip of the listener is different than my ip in tnsnames.

lsnrctl stat

Check below.When the listener is present on 192.168.2.4 the service name is still orcl.168.2.6 which is the old ip.so this has to be taken care in tnsnames file

Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.2.4)(PORT=1521)))
Services Summary...
Service "orcl.168.2.6" has 1 instance(s).
Instance "orcl", status READY, has 1 handler(s) for this service...
Service "orclXDB.168.2.6" has 1 instance(s).
Instance "orcl", status READY, has 1 handler(s) for this service...
Service "orcl_XPT.168.2.6" has 1 instance(s).

what is the difference between 127.000.0.1 and  192.168.2.4 .Why do we write in Host  192.168.2.4 .Though your home ip is 127.000.0.1 . And why will your cognos fail to connect to database installed on your own machine if the net connection is down  ??

192.168.2.4- --- This is assigned to your by your router .Its your ip address for your local network.

Now it's important to note that this is the IP address of the computer. In fact, since I'm behind a router, this is not the IP address that will actually be used when I access the internet. The IP address shown here is my computer's IP address on my local network only.


You can also get ORA-12170 


Check your listener.ora file .Sometime the listener does not start up .the common reason can be ip of your system that is ther in the listener file is wrong .

So when you reconfigure it then the ip gets set automatically. So if you get the error check you listner.ora file and TNS name file .Both of them should have same ips.

No comments:

Post a Comment