Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

How to know the port number to which the server process is listening

561972Oct 13 2007 — edited Oct 18 2007
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 1521 and
SAMPLE server process listens to port no 1522

Once I start the OracleServiceORCL (Service for orcl) from services.msc 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 ?

And how can i know which port no is linked with which server process?

Also if we provide a different port number(other than 1521 say 1522) in tnsnames.ora for a service and consider the listener is listening to both 1521 and 1522 . Now consider that port number 1521 is free . In this case to which port number will the service be listening to ?

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)
)
)
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 15 2007
Added on Oct 13 2007
28 comments
18,912 views