You're right - there isn't any tie between external procedures and a particular SID in 
the listener.  Here's what I am guessing (educated guess based on the docs) happens:
1.  Nothing supports external procedures until one is called.
2.  When a session in a particular database instance calls an external procedure, it 
works very much like accessing a remote database through a database link.  A call goes 
out on Net for a connection to the service named EXTPROC_CONNECTION_DATA.  The naming 
method (TNSNAMES.ORA in my case) has associated this service with a protocol, usually 
IPC (I understand a later version of Oracle can hook to remote external procedures 
with TCP/IP).  IPC identifies the service by a key.
3.  The listener process that is listening for IPC connections with that key name, in 
this case your separate listener, LISTENER_EXT, looks at the program associated with 
that key, which is extproc.
Since there is no instance of extproc running, the listener starts one, and hands off 
the Net connection to it, just as it might hand off a connection to a remote database.
4.  Your session now tells extproc through its Net connection which .DLL or .so it 
wants loaded, and which function to call, passing the proper parameters.  Extproc 
passes back output parameters and function return values.
5.  The connection between the database session and the extproc program is maintained 
for the duration of the session, so that if the session wants to run another external 
procedure (or the same one again), it does not have to go through the listener again.  
This is similar to the way a connection through a database link is maintained.
6.  I don't know whether another session that runs an external procedure will get its 
own copy of extproc, or if it just gets its own connection to the currently running 
copy of extproc.  In either case, the connection is between extproc and a single 
database session on a single database instance.  There is no need to associate the 
listener with a particular SID, anymore than there is a need to associate a database 
listener with a particular database client.

-----Original Message-----
Sent: Thursday, January 08, 2004 7:20 AM
To: Multiple recipients of list ORACLE-L


I have created a seperate listener for external procedures for one of my
SIDs. 

My question is, if I want to do the same for another SID in the same
instance, what ensures that each external procedure listener will only
handle requests for its own SID?.

Here is my listener.ora for the first SID. The external procedure listener
is called listener_ext. I don't see anything in the configuration for the
external procedure listener that ties it to a SID.

Platform is Oracle 9.2 on AIX 5.2


# LISTENER.ORA Network Configuration File:
/usr/u01/network/admin/listener.ora
# Generated by Oracle configuration tools.

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS_LIST =
        (ADDRESS = (PROTOCOL = TCP)(HOST = DEMO)(PORT = 1521))
      )
    )
    (DESCRIPTION =
      (PROTOCOL_STACK =
        (PRESENTATION = GIOP)
        (SESSION = RAW)
      )
      (ADDRESS = (PROTOCOL = TCP)(HOST = DEMO)(PORT = 2481))
    )
  )

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (GLOBAL_DBNAME = FW9i.DEMO)
      (ORACLE_HOME = /u03/app/oracle/product/9.2.0.1.0)
      (SID_NAME = FW9i)
    )
  )


LISTENER_EXT =
        (ADDRESS_LIST = 
         (ADDRESS = (PROTOCOL=IPC) 
         (key = extproc_key)
    )
   )

SID_LIST_LISTENER_EXT = 
   (SID_LIST = 
        (SID_DESC = 
         (SID_NAME = extproc_agent)
          (ORACLE_HOME = /u03/app/oracle/product/9.2.0.1.0)
           (PROGRAM = extproc)
           (ENV = "EXTPROC_DLLS=ANY")
     )
    )


-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: John Dunn
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: John Flack
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

Reply via email to