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: two listeners problem ???

Re: two listeners problem ???

From: Tim Gorman <Tim_at_SageLogix.com>
Date: Sat, 06 Apr 2002 08:18:19 -0800
Message-ID: <F001.0043DD5C.20020406081819@fatcity.com>


Janet,

The format of entries in the "listener.ora" file is organized by "listener-name", which is the phrase trailing the parameters in the file. For example, if you look at your own file, you'll see:

    LISTENER816 = ....     SID_LIST_LISTENER = ...     LISTENER817 = ...     SID_LIST_LISTENER = ... The very first entry identifies a listener-name as "LISTENER816". It should be followed by the parameter "SID_LIST_LISTENER816", not "SID_LIST_LISTENER". "LISTENER" is simply the default listener-name in SQL*Net. Append the name of the listener (i.e. "LISTENER816") to the name of the parameter (i.e. "SID_LIST_"). Then, you'll have to start this listener using the command "lsnrctl start listener816" to start the listener LISTENER816, because the command "lsnrctl start" will only try to start the default listener-name LISTENER.

Then, for LISTENER817, repeat the same process. The first entry (i.e. "LISTENER817 = ...") identifies the name of the listener, which (again) is different from the default name (i.e. "LISTENER"). The parameter for "SID_LIST_", which identifies the Oracle instances that this listener is responsible for, should read "SID_LIST_LISTENER817 = ..."). Last, you'll need to start this listener using the command "lsnrctl start listener817" instead of the default "lsnrctl start"...

So, your "listener.ora" file should be organized like:

    LISTENER816 = ....     SID_LIST_LISTENER816 = ...     LISTENER817 = ...     SID_LIST_LISTENER817 = ... Using a "listener.ora" file set up this way, you could start each listener while your environment variables are "pointing" to one database or the other, or just start both using one database instance's environment variables. For example, assuming that you are using the default "oraenv" script to change environment variables ORACLE_SID, ORACLE_HOME, etc, you could do the following from the UNIX command line:

    $ export ORAENV_ASK=NO
    $ export ORACLE_SID=ORCL816
    $ . oraenv
    $ lsnrctl start listener816
    $ export ORACLE_SID=ORCL817
    $ . oraenv
    $ lsnrctl start listener817

Of course, when properly set up, the "oraenv" script also operates interactively, displaying a list of available ORACLE_SIDs, but in this example I suppressed that using the environment variable ORAENV_ASK...

The other alternative is to just go ahead and start both listeners using one of the Oracle versions of software, preferably the newer one. You are far more likely to encounter stability problems by running an older version of listener software against a newer version of RDBMS software; Oracle tries to design SQL*Net to be backward-compatible, allowing you to run a newer version of listener software against an older version of RDBMS software without mishap (providing you don't try to use newer SQL*Net features on the older RDBMS software, of course!). So, you could do the following without mishap:

    $ export ORAENV_ASK=NO
    $ export ORACLE_SID=ORCL817
    $ . oraenv
    $ lsnrctl start listener816
    $ lsnrctl start listener817

Remember that all of the "lsnrctl" commands (i.e. start, stop, status, services) must now have the listener-name to which you are referring appended (i.e. "lsnrctl stop listener817", "lsnrctl restart listener816", etc). Also, remember that all other "listener.ora" parameters (besides "SID_LIST_") must have the appropriate listener-name appended (i.e. "TRACE_LEVEL_", "CONNECT_TIMEOUT_", etc)...

Hope this helps...

-Tim

> Hi,
>
> I have two databases ORCL817 and ORCL816 in version
> 817, 816 on the same machine Sun 5.7. I'd like to
> configure seperate listener for each database. I used
> different port, listener name (1521 and LISTENER817
> for ORCL817 , 1522 and LISTENER816 for ORCL816), but
> somehow the listener on 1522 cannot be started.
> Why???
>
> Here is the listener.ora and tnsnames.ora for both
> database:
>
> listener.ora for 816
> =========================
> LISTENER816 =
> (DESCRIPTION_LIST =
> (DESCRIPTION =
> (ADDRESS_LIST =
> (ADDRESS = (PROTOCOL = TCP)(HOST =
> gatech-denver1)(PORT = 1522))
> )
> )
> (DESCRIPTION =
> (PROTOCOL_STACK =
> (PRESENTATION = GIOP)
> (SESSION = RAW)
> )
> (ADDRESS = (PROTOCOL = TCP)(HOST =
> gatech-denver1)(PORT = 2481))
> )
> )
>
> SID_LIST_LISTENER =
> (SID_LIST =
> (SID_DESC =
> (GLOBAL_DBNAME = ORCL816)
> (ORACLE_HOME =
> /export/apps/oracle/admin/product/8.1.6)
> (SID_NAME = ORCL816)
> )
>
> tnsnames.ora for 816
> =========================
> ORCL816 =
> (DESCRIPTION =
> (ADDRESS_LIST =
> (ADDRESS = (PROTOCOL = TCP)(HOST =
> gatech-denver1)(PORT = 1522))
> )
> (CONNECT_DATA =
> (SERVICE_NAME = ORCL816)
> )
> )
>
> listener.ora for 817
> =========================
> LISTENER817 =
> (DESCRIPTION_LIST =
> (DESCRIPTION =
> (ADDRESS_LIST =
> (ADDRESS = (PROTOCOL = TCP)(HOST =
> gatech-denver1)(PORT = 1521))
> )
> )
> (DESCRIPTION =
> (PROTOCOL_STACK =
> (PRESENTATION = GIOP)
> (SESSION = RAW)
> )
> (ADDRESS = (PROTOCOL = TCP)(HOST =
> gatech-denver1)(PORT = 2481))
> )
> )
>
> SID_LIST_LISTENER =
> (SID_LIST =
> (SID_DESC =
> (GLOBAL_DBNAME = ORCL817)
> (ORACLE_HOME =
> /export/apps/oracle/admin/product/8.1.7)
> (SID_NAME = ORCL817)
> )
> )
>
> tnsnames.ora
> =================
> ORCL817 =
> (DESCRIPTION =
> (ADDRESS_LIST =
> (ADDRESS = (PROTOCOL = TCP)(HOST =
> gatech-denver1)(PORT = 1521))
> )
> (CONNECT_DATA =
> (SERVICE_NAME = ORCL817)
> )
> )
>
> Anyone knows what went wrong? Thank you!
>
> Janet
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Tax Center - online filing with TurboTax
> http://taxes.yahoo.com/
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> --
> Author: Janet Linsy
> INET: janetlinsy_at_yahoo.com
>
> Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
> San Diego, California -- Public Internet access / Mailing Lists
> --------------------------------------------------------------------
> 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.com
-- 
Author: Tim Gorman
  INET: Tim_at_SageLogix.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
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 Sat Apr 06 2002 - 10:18:19 CST

Original text of this message

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