Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: seperate external procedure listeners for different SIDs

RE: seperate external procedure listeners for different SIDs

From: Goulet, Dick <DGoulet_at_vicr.com>
Date: Thu, 08 Jan 2004 06:54:26 -0800
Message-ID: <F001.005DC268.20040108065426@fatcity.com>


John,

        On the contrary. You do need to associate an EXTPROC with a particular SID otherwise running different versions of Oracle on the same box blows the EXTPROC to hell. You'll notice that in listener.ora there needs to be a line "SID_NAME=" and in TNSNAMES.ora there is a "Connect_data = (sid = " as well. Now a particular database instance/version can only have one extproc_connect_data entry, but with multiple versions each has it's own, and sure enough each has to have a particular sid otherwise they mess each other up.

        BTW: Your description of the process is dead on, with one exception. An instance of extproc is connected to one and only one session in the calling database. If two sessions each need to call an external procedure then each gets it's own instance of extproc. Also if you need to update the dll or so file you have to get everyone to let go of extproc, namely by disconnecting from the database. Although it's like a database link, closing the links does not release extproc. Also using TCP to connect to extproc is not an Oracle recommended method, opens a door to hackers.

Dick Goulet
Senior Oracle DBA
Oracle Certified 8i DBA

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

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: john.dunn_at_sefas.co.uk

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: ListGuru_at_fatcity.com (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: JohnF_at_smdi.com

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: ListGuru_at_fatcity.com (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: Goulet, Dick
  INET: DGoulet_at_vicr.com

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: ListGuru_at_fatcity.com (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).
Received on Thu Jan 08 2004 - 08:54:26 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US