Home » RDBMS Server » Networking and Gateways » query regading listener.ora file
query regading listener.ora file [message #274066] Sat, 13 October 2007 05:51 Go to next message
rolex.mp
Messages: 161
Registered: February 2007
Senior Member
I have created oracle 10g Release 1 database(orcl) in Windows Xp Professional edition through DBCA . I also created one more database(sample) manually .

The ORCL server process listens to port no 1522 and
SAMPLE server process listens to port no 1521

Once I start the OracleServiceORCL (Service for orcl) from services.exe and check the listener status it displays

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

But when I start OracleServiceSAMPLE (Service for sample) from services.exe and check the listener status there is no change . Only when i start the instance the dynamic registration takes place with port no 1521 .

There is no entry for listener parameter in init.ora file . My question is how is the service ORCL able to get itself registered with the listener even before the instance is up ?

The listener file looks like this

SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = D:\oracle\product\10.1.0\Db_2)
(PROGRAM = extproc)
)
)

LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = irobo)(PORT = 1521))
)
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = irobo)(PORT = 1522))
)
)


The tnsnames file has the following entry

ORCL =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = irobo)(PORT = 1522))
)
(CONNECT_DATA =
(SERVICE_NAME = ORCL)
)
)

SAMPLE =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = irobo)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = ORCL)
)
)

EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
)
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
)
)


Re: query regading listener.ora file [message #274067 is a reply to message #274066] Sat, 13 October 2007 06:00 Go to previous messageGo to next message
Michel Cadot
Messages: 64119
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
And you still don't know how to format your post.

Regards
Michel
Re: query regading listener.ora file [message #274070 is a reply to message #274066] Sat, 13 October 2007 06:13 Go to previous messageGo to next message
rolex.mp
Messages: 161
Registered: February 2007
Senior Member
Sorry for that

Listener.ora file


SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = PLSExtProc)
      (ORACLE_HOME = D:\oracle\product\10.1.0\Db_2)
      (PROGRAM = extproc)
    )
  )

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = irobo)(PORT = 1521))
    )
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = irobo)(PORT = 1522))
    )
  )



Tnsnames.ora file


ORCL =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = irobo)(PORT = 1522))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = ORCL)
    )
  )

SAMPLE =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = irobo)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = ORCL)
    )
  )

EXTPROC_CONNECTION_DATA =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
    )
    (CONNECT_DATA =
      (SID = PLSExtProc)
      (PRESENTATION = RO)
    )
  )

Re: query regading listener.ora file [message #274075 is a reply to message #274070] Sat, 13 October 2007 08:23 Go to previous messageGo to next message
Michel Cadot
Messages: 64119
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Quote:

SAMPLE =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = irobo)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = ORCL)
)
)


Are you sure sample service_name is orcl?

Regards
Michel

[Updated on: Sat, 13 October 2007 08:24]

Report message to a moderator

Re: query regading listener.ora file [message #274104 is a reply to message #274066] Sat, 13 October 2007 20:04 Go to previous messageGo to next message
rolex.mp
Messages: 161
Registered: February 2007
Senior Member
Sorry for that ... actually it is SAMPLE


But still whenever I start the OracleServiceORCL service (not the instance) and check status of listener through lsnrctl I see that


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



How does this happen ? How is the service able to register itself with the listener even before the instance is up ?
Re: query regading listener.ora file [message #274106 is a reply to message #274066] Sat, 13 October 2007 20:37 Go to previous messageGo to next message
BlackSwan
Messages: 25041
Registered: January 2009
Location: SoCal
Senior Member
>Sorry for that ... actually it is SAMPLE
Perhaps you'd benefit from remedial CUT & PASTE training.

Instance auto-registration is built into V10.
With V10 a listener.ora file is NOT required!

[Updated on: Sat, 13 October 2007 20:39] by Moderator

Report message to a moderator

Re: query regading listener.ora file [message #274108 is a reply to message #274106] Sat, 13 October 2007 20:43 Go to previous messageGo to next message
rolex.mp
Messages: 161
Registered: February 2007
Senior Member
So do you mean that this registration happens even before startup ?

I changed tnsnames.ora file such that port number of ORCL is 1521
and port number of SAMPLE is 1522 . For both instances I have not set the LOCAL_LISTENER initialization parameter.

However, when I start the instance and check the listener it displays

Service "sample" has 1 instance(s).
Instance "sample", status READY, has 1 handler(s) for this service...

How is sample instance able to dynamically register to the listener since the port number used in tnsnames is not he default one ?
Re: query regading listener.ora file [message #274109 is a reply to message #274066] Sat, 13 October 2007 20:55 Go to previous messageGo to next message
BlackSwan
Messages: 25041
Registered: January 2009
Location: SoCal
Senior Member
>How is sample instance able to dynamically register to the listener since the port number used in tnsnames is not he default one ?
What part of "Instance auto-registration is built into V10." do you NOT understand?

It appears you don't understand the purpose & function of tnsnames.ora file.

TNSNAMES.ORA file is used by a SQL*Net client to find/access a "remote" database (RSID).
TNSNAMES.ORA file has NOTHING to do with the Oracle listener.

"REMOTE" is in quote marks because the database being accessed could actually be on the same system as the client.
However such access requires that an Oracle (network) listener be operational and "knows" about the RSID.

This network access is differentiated by accessing a LOCAL instance via IPC/Bequeth protocol; where no listner needs to be operational.
Re: query regarding listener.ora file [message #274110 is a reply to message #274066] Sat, 13 October 2007 21:38 Go to previous messageGo to next message
rolex.mp
Messages: 161
Registered: February 2007
Senior Member
Sorry I still have a doubt regarding the listener.ora file

Consider if we have only one port number specified in listener.ora file , can both the databases share the same port since I changed the listener.ora specifying only one entry with port number 1521 .
When I tried connecting to both the databases it was working fine .

When i checked netstat earlier when there were two port numbers specified in the listener.ora file , only one port number 1521 was used . Does this mean the same port number is shared by both server process?


Re: query regading listener.ora file [message #274111 is a reply to message #274066] Sat, 13 October 2007 21:49 Go to previous messageGo to next message
BlackSwan
Messages: 25041
Registered: January 2009
Location: SoCal
Senior Member
>Sorry I still have a doubt regarding the listener.ora file
Why am I not surprised?
With V10 a listener.ora file is NOT required!
Every LOCAL V10 database will be serviced by a single V10 listener.

>can both the databases share the same port
Yes, I've run EIGHT databases on the same server on 1521.

>Does this mean the same port number is shared by both server process?
I am not sure what you mean by "both server process?"
I suspect that only a single Oracle listener is/was running.

ps -ef | grep -i listen
Re: query regading listener.ora file [message #274112 is a reply to message #274066] Sat, 13 October 2007 22:23 Go to previous messageGo to next message
rolex.mp
Messages: 161
Registered: February 2007
Senior Member
I am working in Windows XP

When I start the service(OracleSericeORCL) using services.msc even though the instance is not started the instance is registered with listener . Here the instance is not up but still its getting registered.

When I start the service(OracleSericeSAMPLE) using services.msc the instance is not getting registered with listener unless i start up the instance using startup command .

Why is that so ?

The only difference is I created ORCL through DBCA and I created SAMPLE manually
Re: query regading listener.ora file [message #274113 is a reply to message #274066] Sat, 13 October 2007 22:38 Go to previous messageGo to next message
BlackSwan
Messages: 25041
Registered: January 2009
Location: SoCal
Senior Member
> the instance is not getting registered with listener unless i start up the instance using startup command .
>Why is that so ?
1) because that is the way it is supposed to work
2) If the instance it NOT available (down) why would you want/expect the listener to report that the down instance as being available?
3) It make NO sense to have the listener report/advertise an instance to which it can NOT make a connection.
4) Please explain how a listener is supposed to know an instance exists before the instance starts.
5) Should a listener report SID=ID10T is available before it ever exists? How about SID=PHANTOM or SID=ROLEX, or etc...
Re: query regading listener.ora file [message #274266 is a reply to message #274109] Mon, 15 October 2007 04:58 Go to previous messageGo to next message
yogeshyl
Messages: 50
Registered: October 2007
Location: Silvassa
Member
If the database is in the same pc. Then what should be the changes in tnsnames.ora file.
Re: query regading listener.ora file [message #274318 is a reply to message #274066] Mon, 15 October 2007 09:52 Go to previous messageGo to next message
BlackSwan
Messages: 25041
Registered: January 2009
Location: SoCal
Senior Member
yogeshyl,
Do not hijack threads started by others.
If you have a problem, start your own thread.

If/when database is on local PC, then tnsnames.ora file is NOT needed.
Re: query regading listener.ora file [message #274836 is a reply to message #274066] Wed, 17 October 2007 06:38 Go to previous message
Arju
Messages: 1554
Registered: June 2007
Location: Dhaka,Bangladesh. Mobile:...
Senior Member


Quote:

Instance auto-registration is built into V10.


Unfortunately this is not done through Version: 10.2.0.1 to 10.2.0.2 and in some case 10.2.0.3

Because, there the idiot indian author vikruma has put the path ORACLE_HOME_LISTENER hardcoded in the dbstart script.
Previous Topic: Client Side Application Hanging when connecting to Database
Next Topic: Oracle client-server Communication
Goto Forum:
  


Current Time: Tue Dec 06 10:28:25 CST 2016

Total time taken to generate the page: 0.22534 seconds