Tuesday, January 18, 2011

When is listener.ora needed

Today I got stucked with ora:12514 : TNS: listener does not know cuurrently of service requested in connect descriptor.

When I tried to connect with sqlplus using
sql> conn sys/sys@xe as sysdba

I got ora:12514 error

Initially, I thought that error occured due to non registration of xe database service with the listener. And I tried to set the parameters of static service registration in listener.ora file.
But later I got the knowledge that error occured because my database server has not yet been started. Without starting the database I was trying to connect to the database which is a wrong, even impossible action.
After much struggle, I got the idea of the actual problem.

A listener.ora file is NOT needed to start a default listener. I renamed my file to something else, so that I have NO file named "listener.ora". Then I restarted the listener, and it came up just fine with all default values .

If the listener uses default values, there is nothing special needed to get the instance to self-register with the listener. If the listener is already running when the instance starts, it should register on startup. It will also re-register every few minutes there after, so if the listener comes up after the db instance, it may take a couple of minutes for the registration to occur and the listener come to know of the instance.

No comments:

Post a Comment

Please write your comments here.